-
Notifications
You must be signed in to change notification settings - Fork 497
Open
Description
When slicing a VF with ital or slant axis, varLib instancer could set up proper italic style bits + italic angle + caret slope if italic != 0 and if slant != 0. For example with and additional argument like --is-italic followed by an integer for italic angle.
For example when running:
fonttools varLib.instancer "../fonts/variable/Nunito[ital,wght].ttf" ital=1 wght=200:1000 -o "../fonts/variable/Nunito-Italic[wght].ttf"
Then we have to patch this kind of metadata:
for font_path in glob.glob("../fonts/variable/*Italic*.ttf"):
with open(font_path, "rb") as f:
print("Fix italic style linking in {}".format(font_path))
ttFont = TTFont(f)
ttFont["head"].macStyle = MacStyle.ITALIC
ttFont["post"].italicAngle = -9
ttFont["hhea"].caretSlopeRise = 1000
ttFont["hhea"].caretSlopeRun = 158
ttFont.save(font_path)
davelab6 and colinmford
Metadata
Metadata
Assignees
Labels
No labels