Hey,
I noticed some text being slightly misaligned after updating my device past 2.5.0 and after some investigation, it seems to be that the width
as returned by graphics.drawText
is calculated differently between SDK 2.5.0 and 2.6.0.
EDIT: I just realised that this also occurs when a string ends in a space, i.e. "Hi"
and "Hi "
now return the same length, whereas in 2.5.0 the latter was longer. That feels a bit unexpected and not very desirable imho.
The other problem only happens when using a font with "negative kerning" on the glyphs, like so:
SDK 2.6.0 returns a width of 2px
more than in 2.5.0, so I wonder if it's ignoring the negative advance width from the last character, or calculating the "real" width of the drawn text somehow?
Is this new behaviour correct? Or was this not an intentional change?