What is the relationship between a font Glyph Ascender and Descender in iOS?

后端 未结 1 1471
你的背包
你的背包 2021-01-06 05:55

I\'m working with fonts in a UILabel (iOS7) and have come across something I\'m hoping someone can explain: What is the relationship between a fonts\' Glyph, Ascender, and D

相关标签:
1条回答
  • 2021-01-06 06:34

    Every glyph (letter shape) in the font is a different size and shape, right? The glyph for character 'A' is taller than the glyph for character 'a', the top of the 't' glyph is different again.

    Font.ascender is the maximum value for all letter shapes (glyphs) and Font.descender is the minimum value.

    Any particular font could easily have an extra tall glyph that meant the Font.ascender value had no relation to the dimensions of a string that didn't contain that character.

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