VerticalMetrics.md "bbox ymax"
Closed this issue · 3 comments
weiweihuanghuang commented
Does this mean the y value of the highest point in a font, it's not immediately clear to me what that term means?
thundernixon commented
Super belated reply, but I believe the answer is "yes."
If you'd like to find this in GlyphsApp, I've written a script to find this value (as well as the yMin):
font = Glyphs.font
# starter values
maxDescent = 0
maxAscent = 0
# find highest and lowest point in font
for glyph in font.glyphs:
for layer in glyph.layers:
# get descender of current layer
descent = layer.bounds.origin.y
# get ascender of current layer
ascent = layer.bounds.size.height + descent
# if descent/ascent of current layer is greater than previous max descents/ascents, update the max descent/ascent
if descent <= maxDescent:
maxDescent = descent
if ascent >= maxAscent:
maxAscent = ascent
# print values in the Macro window ouput panel
print(maxDescent, maxAscent)
thundernixon commented
Actually, to meet the vertical metrics spec, as far as I can tell, it looks like all of this is fixed in Custom Parameters by using fixfonts.py
from Google Fonts Glyphs Scripts. So, no need to use my code above.
weiweihuanghuang commented
Great news! Will close this now