[varLib instancer] should set up italic style linking as an option
See original GitHub issueWhen 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)
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:26 (13 by maintainers)
Top Results From Across the Web
[varLib.mutator] Does not mutate weight/width/italicAngle · Issue ...
[varLib.mutator] Does not mutate weight/width/italicAngle #1264 ... [varLib instancer] should set up italic style linking as an option #2613.
Read more >instancer — fontTools Documentation - Read the Docs
The module exports an instantiateVariableFont function and CLI that allow to create full instances (i.e. static fonts) from variable fonts, as well as...
Read more >What is expected of style linking for variable fonts?
In variable fonts, italics are most likely to be treated as a binary pairing, implemented in a separate font.
Read more >Variable font naming for italic face (conflict with regular) - Glyphs
I have 2 variable font glyphs files for upright (regular) and italic that have the same family name, style linking and 9 export...
Read more >python-fontbro - PyPI
friendly font operations on top of fontTools. ... pip install python-fontbro ... Creates a new Font instance reading the same binary file.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There are several links and conversation in this issue: https://github.com/googlefonts/gftools/issues/297. Our last testing about this is from this summer 2022, didn’t check if CC23 has fixed it yet. Fontbakery’s related issue is still opened.
Hi, sorry I was on holidays.
The PR did fixed the style linking issue but I still see 2 things that would influence user experience: