> By far I have found 3 sets of ascent/descent/height metrics. We > have ascender/descender/height from FT_Face. We have > ascender/descender/height from FT_Size_Metrics. We also have > sTypoAscender/sTypoDescender from TT_Face. How do they differ from > each other?
You haven't yet read the documentation files I've pointed to, right? >From http://www.microsoft.com/OpenType/OTSpec/recom.htm: sTypoAscender is used to determine the optimum offset from the top of a text frame to the first baseline. sTypoDescender is used to determine the optimum offset from the last baseline to the bottom of the text frame. The value of (sTypoAscender - sTypoDescender) is recommended to equal one em. [...] For Western fonts, the Ascender and Descender fields in Type 1 fonts' AFM files are a good source of sTypoAscender and sTypoDescender, respectively. The Minion Pro font family (designed on a 1000-unit em), for example, sets sTypoAscender = 727 and sTypoDescender = -273. sTypoAscender, sTypoDescender and sTypoLineGap specify the recommended line spacing for single-spaced horizontal text. The baseline-to-baseline value is expressed by: OS/2.sTypoAscender - OS/2.sTypoDescender + OS/2.sTypoLineGap sTypoLineGap will usually be set by the font developer such that the value of the above expression is approximately 120% of the em. The application can use this value as the default horizontal line spacing. The Minion Pro font family (designed on a 1000-unit em), for example, sets sTypoLineGap = 200. On this page you find more details how the various metrics data *within an OpenType file* differ. A complete description of FreeType's glyph metrics can be found at http://freetype.freedesktop.org/freetype2/docs/glyphs/glyphs-3.html. In case this file doesn't explain everything, it is a bug in the documentation, and I ask you to send questions (again) to the freetype-devel list so that it is going to be fixed. Werner _______________________________________________ Freetype mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/freetype
