foliojs / fontkit

An advanced font engine for Node and the browser
1.46k stars 219 forks source link

[Request]: add typoAscender and typoDescender metrics #198

Closed simonwilbert closed 5 years ago

simonwilbert commented 5 years ago

Some apps use the typoAscender and typoDescender values of a font to determine the offset of the first baseline in a text box and the minimum size of a text box below which the display of type is suppressed.

Please could fontKit be updated to include these additional two metrics?

moyogo commented 5 years ago

These are already by accessible via font['OS/2'].typoAscender, font['OS/2'].typoDescender and font['OS/2'].typoLineGap when the OS/2 table is present. Do you mean you want them as font.typoAscender, font.typoDescender and font.typoLineGap?

simonwilbert commented 5 years ago

Thanks for this information.