Closed GoogleCodeExporter closed 8 years ago
This problem was because in some fonts the width of ' ' (space) is 0.
I added this 'fix' to the creation of the font:
paint.getTextBounds(" ", 0, 1, rect);
mFont.mSpaceWidth = (short) (rect.right - rect.left + mFont.mBorder);
if (mFont.mSpaceWidth==0)
{
paint.getTextBounds("x", 0, 1, rect);
mFont.mSpaceWidth = (short) (rect.right - rect.left + mFont.mBorder);
}
So. If the width of ' ' is 0 use the width of 'x'
Thank you for your testing.
Original comment by ipaju...@gmail.com
on 13 Apr 2010 at 3:47
Original issue reported on code.google.com by
cilheo
on 13 Apr 2010 at 12:36