I have a problem with drawing text on canvas of SurfaceView
. I need to draw text each frame with different size. To change text size i use:
mTextPaint.setTextSize(mTextSize);
mTextSize
is calculating correctly and has float values, but it looks like text
scaling is happening by steps and it is not smooth (looks like symbols are changing size, for example, from 9 to 10 like this 9 -> 9.25 -> 9.5 ->9.75 -> 10).
I used flags on paint but it didn't help.
TextPaint mTextPaint = new TextPaint(TextPaint.ANTI_ALIAS_FLAG | TextPaint.SUBPIXEL_TEXT_FLAG | TextPaint.FAKE_BOLD_TEXT_FLAG | TextPaint.LINEAR_TEXT_FLAG);
mTextPaint.setTextAlign(Paint.Align.CENTER);
Do font symbols have some predefined sizes or problem is in something other?