googlefonts / googlefonts/glyphsLib
Do not write com.schriftgestaltung.customParameter.GSFont.(Axes|Axis Mappings) to UFO?
- Dominant language
- Python
- Stars
- 201
- Forks
- 56
- Avg merge
- 17m
- Merged PRs (30d)
- 1
Description
It's Designspace info and currently it takes precedence over what is in the Designspace, so if you change e.g. axis names and do ufo2glyphs, you'll get errors like
```
Traceback (most recent call last):
File "C:\...\glyphsLib\cli.py", line 189, in main
return options.func(options)
File "C:\...\glyphsLib\cli.py", line 266, in ufo2glyphs font = glyphsLib.to_glyphs(
File "C:\...\glyphsLib\builder\__init__.py", line 145, in to_glyphs
return builder.font
File "C:\...\glyphsLib\builder\builders.py", line 766, in font
self.to_glyphs_instances()
File "C:\...\glyphsLib\builder\instances.py", line 194, in to_glyphs_instances
user_loc = interp(reverse_mapping, design_loc)
File "C:\...\glyphsLib\builder\axes.py", line 607, in interp
if xa <= x <= xb:
TypeError: '<=' not supported between instances of 'float' and 'NoneType'
```
because the UFO lib key may call an axis `"weight"` when the Designspace calls it `"Weight"`, leading to `None`s going around.
Contributor guide
Research direction
Start with the ufo2glyphs entry point in cli.py and follow the conversion paths named in builder/instances.py and builder/axes.py. Reproduce the failure with mismatched axis names such as “weight” and “Weight”; done means the GSFont axis custom parameters are not written to UFO data and conversion no longer produces None-related errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100