-
Notifications
You must be signed in to change notification settings - Fork 14
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
Reading glyph.height from file #273
Comments
It is not "wrong", it's just how the UFO spec defines it currently. I have actually proposed to change the default height value but it will be a breaking change so would probably requires a UFO spec major version bump. |
How does height work, anyway? Does it always require a vertical origin? |
if omitted for a specific glyph, we have it default to the OS/2.sTypoAscender currently: height defines the vertical advance in vmtx (like width does for hmtx). The vertical origin is used to compute the top side bearing defined as (verticalOrigin - bounds.yMax) |
Ok. In my format experiments, I was tempted to treat a UFO glyph's origin and height as a unit, as in, the height is only defined if there's an explicit origin also present. Could this be a band-aid for the g2u2g case? I.e. the origin cannot be implicit, and that's how you can tell if a glyph has a zero height (origin and height diff to 0) or an undefined one (no origin). @schriftgestalt How does height work in Glyphs.app? |
The height (called |
When reading a .glif, the
glyph.height
is set to zero if it is not defined in the file. That makes it impossible to distinguish between manually defined zero height glyphs and just default/undefined ones. Would it be better to setglyph.height
toNone
if not defined in the file?I came across this when round tripping .glyphs > .ufo > .glyphs as the resulting .glyphs files have
vertwidth = 0
for all glyphs. That is clearly wrong.The text was updated successfully, but these errors were encountered: