Android: is Paint.breakText(…) inaccurate?

后端 未结 2 1068
攒了一身酷
攒了一身酷 2021-01-06 02:02

I have a View which draws a rectangle with a line of text inside of it. The view uses break text to ensure that no text extends outside of the rectangle; it ignores any tex

相关标签:
2条回答
  • 2021-01-06 02:35

    The problem might be how you draw your rectangle. Strokes are not outside of the rectangle, half of the stroke is inside, half is outside.

    0 讨论(0)
  • 2021-01-06 02:42

    This was fixed by: Paint.setSubpixelText(true);

    0 讨论(0)
提交回复
热议问题