Pixel Alignment and Anti-Aliasing in TextView

I am having trouble getting the font rendered consistently in the text view, it looks like anti-aliasing is causing the problem, but the end result is that the widths of the different characters are different. Here's an enlarged look at the problem, this is from a single TextView using Roboto-thin. Compare "I" on the first line with "L" on the second line:

zoom in on text rendering

This screenshot uses a 36sp font on a 720p xhdpi phone. The effect is worse at smaller font sizes (since anti-aliasing becomes more important). Is there anything I can do to affect the pixel-level placement of characters that might make things better?

+3


source to share





All Articles