googlefonts / googlefonts/glyphsLib
Glyphs 3 properties are sometimes left in custom parameters
- Dominant language
- Python
- Stars
- 201
- Forks
- 56
- Avg merge
- 17m
- Merged PRs (30d)
- 1
Description
Things like "vendorID" are stored in the custom parameters of a Glyphs 2 file and the properties entry of a Glyphs 3 file. (See #707)
Our code checks whether it has a Glyphs 3 file and if so, looks in `properties`:
https://github.com/googlefonts/glyphsLib/blob/24b4d340e4c82948ba121dcfe563c1450a8e69c9/Lib/glyphsLib/builder/custom_params.py#L257-L261
But guess what? If a Glyphs 2 file is loaded into Glyphs 3 and saved as a Glyphs 3 format file, Glyphs does *not* upgrade any custom parameters to properties, but just leaves them where they are:
```
{
.appVersion = "3109";
.formatVersion = 3;
axes = (...);
customParameters = (
{
name = vendorID;
value = GOOG;
},
```
When we compile this with glyphsLib, we look in properties for `vendorID`, find nothing, and return None. So we need to check both places.
Contributor guide
Research direction
Start in Lib/glyphsLib/builder/custom_params.py at lines 257-261, where Glyphs 3 properties are read. Check the provided Glyphs 3-format example and verify that vendorID and similar values are found whether stored in properties or customParameters; done means the compiler no longer returns None for either location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100