You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RoboFont has the very useful glyph attributes glyph.angledLeftMargin and glyph.angledRightMargin in its API. This is pretty vital when scripting Italic fonts. If I just ask for the basic left/right margin, it is “wrong” in terms of how I need to manipulate a glyph drawing.
Is there an existing function to get glyph.angledLeftMargin and glyph.angledRightMargin, or object with these attributes (in ufoLib2 or elsewhere, but independent of a font editor)?
As a specific example, if I try to position an ogonek anchor on an italic /E, I am unsure of how to determine the bottom right corner... even though it is the further-right point, if the margin is angled. Even if I use the font.lib["com.typemytype.robofont.italicSlantOffset"] of the UFO, it is still way off, because using the glyph bounds or basic rightMargin value is based on the top right corner. (This makes sense, because the font is ultimately just in a rectangle, and the angled margins are just there to help designers draw italic fonts in a way that makes sense... but when I’m coding, I frequently wish I had a way to do this, too!)
Thanks for any tips or pointers, if you happen to have them!
The text was updated successfully, but these errors were encountered:
RoboFont has the very useful glyph attributes
glyph.angledLeftMargin
andglyph.angledRightMargin
in its API. This is pretty vital when scripting Italic fonts. If I just ask for the basic left/right margin, it is “wrong” in terms of how I need to manipulate a glyph drawing.Is there an existing function to get
glyph.angledLeftMargin
andglyph.angledRightMargin
, or object with these attributes (in ufoLib2 or elsewhere, but independent of a font editor)?As a specific example, if I try to position an
ogonek
anchor on an italic /E, I am unsure of how to determine the bottom right corner... even though it is the further-right point, if the margin is angled. Even if I use thefont.lib["com.typemytype.robofont.italicSlantOffset"]
of the UFO, it is still way off, because using the glyph bounds or basic rightMargin value is based on the top right corner. (This makes sense, because the font is ultimately just in a rectangle, and the angled margins are just there to help designers draw italic fonts in a way that makes sense... but when I’m coding, I frequently wish I had a way to do this, too!)Thanks for any tips or pointers, if you happen to have them!
The text was updated successfully, but these errors were encountered: