Unable to add "linkedValue" with otlLib.builder buildStatTable()
See original GitHub issueScenario:
- I have a variable font
- I am adding a STAT table with this add-STAT.py script
- My script includes this entry for the Regular weight:
dict(nominalValue=400, rangeMinValue=350.00001, rangeMaxValue=450, name="Regular", flags=0x2, linkedValue=700)
- When I use
ttx -t STAT -o- "fontfamily.ttf"
to view the result, there is most of the stat table, but the Regular entry has no<LinkedValue>
entry - FontBakery is telling that
700
is an expected and missing linked value for Regular
I’ve triple-checked my syntax and spelling and I think I’m doing everything correctly, though of course I might be missing something.
I’m on FontTools version 4.37.1, though a test of the same process on 4.35.0 yields the same result (not surprising, as I think this function has been stable or awhile). I have also tested dropping the table (ttx -x
), checking that is was gone, then re-running the script… and got the same result.
Could something be getting in the way of adding this value? Is FontBakery incorrect in saying that Regular should have a linkedValue of 700?
Thank you so much for any insights here!
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Issues · fonttools/fonttools - GitHub
Contribute to fonttools/fonttools development by creating an account on GitHub. ... Unable to add "linkedValue" with otlLib.builder buildStatTable().
Read more >Source code for fontTools.otlLib.builder - Read the Docs
otlLib.error import OpenTypeLibError from functools import reduce import logging import ... canAdd(glyphs): return None classdefbuilder.add(glyphs) return ...
Read more >Diff - platform/external/fonttools - Google Git
Builder` class can add features to an existing +font file. ... otlLib.builder import buildStatTable + buildStatTable(self.font, axes, locations, ...
Read more >Fonttools Fonttools Issues - IssueHint
Unable to add "linkedValue" with otlLib.builder buildStatTable(), open, 5, 2022-09-06, 2022-11-25. [COLRv1] Drop DeltaSetIndexMap when not needed, closed ...
Read more >FontTools fonttools Issues - Giters
[ttLib] removeOverlaps pathops fails with glyphSet argument. Closed 18 days ago 4 ... Unable to add "linkedValue" with otlLib.builder buildStatTable().
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
Ditto what Jany says. Maybe buildStatTable should raise an error explaining this when both a range and a linkedValue is requested.
I think it’s because there is no STAT format for your Regular entry, that has both a range and a linked value, it’s either format 2 for the range or format 3 for the linkedValue.
There’s a little recap table in the designspace docs: https://fonttools.readthedocs.io/en/latest/designspaceLib/xml.html#label-element-axis
OT Spec: https://docs.microsoft.com/en-us/typography/opentype/spec/stat#axis-value-table-format-1