New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[designspaceLib] Multiple <mappings> elements in .designspace format, without support in Python API? #3466
Comments
It should work just fine if napping have descriptions. The Is that still problematic in your opinion? I can synthesize group descriptions or something to round-trip. |
Ah, I see I misunderstood the code, thanks for pointing that out. So the code does output multiple I now understand how this works for round tripping. But only as long as the group description is unique, though. I find this an unfortunate mismatch between format and API, and feels like a hack. |
We can definitely change it. No one replies on it yet... What do you suggest? |
My current thought is: allowing multiple |
I'm find that. I'll come up with a PR. |
I’m fine going back to a single |
I haven't forgotten this. I'll try to find the time to revert the change and just use description. |
Re:
#3435
#3437
Do I understand correctly that multiple axis mappings groups are "flattened" into one group in the DesignSpaceDocument?
The "read" code seems to flatten all groups into one group:
fonttools/Lib/fontTools/designspaceLib/__init__.py
Lines 2117 to 2139 in 430e364
The "write" code only ever seems to output a single
<mappings>
element:fonttools/Lib/fontTools/designspaceLib/__init__.py
Lines 1444 to 1457 in 430e364
I don't think it is a good idea to add features to the format without having the reader/writer support them in a round-trippable way.
This is really problematic when the .designspace file isn't edited in a text editor, like Fontra does, or RoboFont's DesignSpace editor.
Maybe it has not been spelled out, but to me designspaceLib has always promised "readfile, write it back and get the same document" (ignoring comments or formatting differences).
We should either change the API to properly support multiple mappings groups, or allow only one
<mappings>
element.The text was updated successfully, but these errors were encountered: