One glyph of a font does not scale accordingly

I'm using a font (not mine) for writing things on an image by code.

Though every glyph scales well with each other, one does not (in that particular case, the number 2).

See as the number 2 scales differently comparing to the other glyphs (top left-hand corner).

I don't know much about how fonts work but I tried opening it in a font editing software.
However, I couldn't notice any striking difference between the number 2 and other glyphs (at first glance).

Any help would be very appreciated. Thank you!

1 answer

  • answered 2020-07-29 17:56 Peter Constable

    What is most likely happening is that the glyph for 2 in that font has hinting data that is poorly implemented. Hints make adjustments to outlines and how they get rasterized for particular sizes. When hints are poorly implemented, you can see really strange artefacts that change at different sizes.

    This is a risk of using free fonts: you get what you pay for.