Different TypeFaces render text at different size

If you ask for a font with a given pixel height, you’ll get one where the ascenders + descenders fit into that number of pixels. The bodies of the font may be any size, because obviously different fonts have different ratios between their ascenders/descenders + body sizes.

If you ask for a number of points, then that’s the body size, but you don’t have control over the total height of the resulting font, so it could have ascenders + descenders that are too big for the space you’re putting it in.

It’s not that either of these ways of asking for a font is more correct than the other, they’re just different. Use the one that’s appropriate for your app.

1 Like