[designspaceLib] "Recursive" linkedUserValue valid?
See original GitHub issueI noticed that Adobe seems to link upright and italic VFs “recursively”, i.e. on the Italic axis, the upright has linkedUserValue=“1”, and the italic has linkedUserValue=“0”. As seen in Source Code Variable:
Such configuration can not be built with designspaceLib, it throws a RecursionError.
Should it be possible to build such fonts? Or is that kind of linking disallowed? The ital
axis spec doesn’t say anything about linkedUserValue.
Reproducer: linkeduservalue.zip
Traceback (most recent call last):
File "/Users/kuti/Code/variable-fonts/Test/test.py", line 12, in <module>
names = getStatNames(ds, loc)
File "/Users/kuti/Quellen/fonttools-github/Lib/fontTools/designspaceLib/statNames.py", line 126, in getStatNames
regularStatNames = getStatNames(doc, regularUserLocation)
File "/Users/kuti/Quellen/fonttools-github/Lib/fontTools/designspaceLib/statNames.py", line 126, in getStatNames
regularStatNames = getStatNames(doc, regularUserLocation)
File "/Users/kuti/Quellen/fonttools-github/Lib/fontTools/designspaceLib/statNames.py", line 126, in getStatNames
regularStatNames = getStatNames(doc, regularUserLocation)
[Previous line repeated 987 more times]
File "/Users/kuti/Quellen/fonttools-github/Lib/fontTools/designspaceLib/statNames.py", line 66, in getStatNames
defaultSource: Optional[SourceDescriptor] = doc.findDefault()
File "/Users/kuti/Quellen/fonttools-github/Lib/fontTools/designspaceLib/__init__.py", line 2768, in findDefault
print(sourceDescriptor)
File "/Users/kuti/Quellen/fonttools-github/Lib/fontTools/designspaceLib/__init__.py", line 116, in __repr__
attrs = indent('\n'.join(attrs), ' ')
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/textwrap.py", line 488, in indent
return ''.join(prefixed_lines())
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/textwrap.py", line 487, in prefixed_lines
yield (prefix + line if predicate(line) else line)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/textwrap.py", line 483, in predicate
return line.strip()
RecursionError: maximum recursion depth exceeded while calling a Python object
Issue Analytics
- State:
- Created a year ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
[designspacelib] discrete axis, 2 fonts, how to set ... - GitHub
I'm struggling with a STAT issue and I want to solve it using ds5 and fontmake. It is a typeface with an interpolating...
Read more >Generator for `ActionView::TestHelper` - Shopify/Tapioca - IssueHint
[designspaceLib] "Recursive" linkedUserValue valid? 9, 2022-10-18, 2022-11-13. 为什么使用ERNIE-SAT声音克隆,从中文生成的英文语音完全听不懂?
Read more >FontTools fonttools Issues - Giters
Empty name entry generated if elidable="true" in Designspace v5 `label` element ... [designspaceLib] "Recursive" linkedUserValue valid?
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
Thanks! I think the problem is here:
https://github.com/fonttools/fonttools/blob/bc03f0932208c71ecb1bca40a348fdf0170f5abe/Lib/fontTools/designspaceLib/statNames.py#L200-L225
The comparison
urpright_label.linkedUserValue == userLocation[axis.name]
is true for both locations on the italic axis.Ah right, sorry I forgot about that issue. I’ll push a PR