-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
calculation of top/bottomMargin #507
Comments
@schriftgestalt I don't know about fontParts, but you may be interested in this related discussion on the ufo-spec repo about verticalOrigin, and the different defaults for glyph.height between defcon (0), on the one hand, and Glyphs.app/FDK (OS2.TypoAscender - OS2.TypoDescender), and my proposal to try align the two: unified-font-object/ufo-spec#95 (comment) |
ufo2ft sets the default verticalOrigin to OS2.TypoAscender, if a particular glyph doesn't have a then the top sidebearing is computed as the verticalOrigin - bbox.yMax |
Here's the code: https://github.com/robotools/fontParts/blob/master/Lib/fontParts/base/glyph.py#L493 |
As far as I see getting the topMargin of BaseGlyph will trigger a That will produce values not suitable for CJK glyphs. The links that Cosimo posted explain it quite well. |
How is fontParts calculating the vertical side bearings? What is the vertical origin?
The text was updated successfully, but these errors were encountered: