Get font character spacing in Android
When I was drawing on Canvas, I tried to get the character spacing for any font in Android, I searched in Google but didn’t find anything.
Is there a way to get font character spacing?
I’m going to make a WAG, and what this use case really needs is an approach that is more in line with:
Both methods are overloaded. The link points to the link that appears first in the document.
The reason you don’t find information about the distance between characters may be that for most uses it is irrelevant. What is relevant is the final width of the rendered text, or its boundary.
does this work with canvas ?
I’m browsing methods for
Canvas 1 When I saw it! To emphasize, I’m new to Android, but experienced in working with standard desktop Java (J2SE). In J2SE, I’ve never heard of issues about character spacing. Many questions about width or borders.
But be sure to check the same documentation I’ve been looking at, search for “paint” and find ways to use it when rendering text.
- Developer Guides link at the top of the document is also helpful at this point. They tend to cover this sort of thing.