googlefonts / googlefonts/glyphsLib

Possible bug in GlyphsLib when defining the default master into designspace file

Open
#626 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
201
Forks
56
Avg merge
17m
Merged PRs (30d)
1

Description

## Observed behaviour

When trying to change the default value for the Weight axis from Thin to Light, it was not possible to generate the Variable Font due to a possible bug in GlyphsLib with the Default value or master.

Process followed (and reviewed with @m4rc1e):

1. Source file without Axis Mapping
fontmake -g BigShoulders.glyphs -o variable
R: `Error. Source or instance ‘Big Shoulders Thin’ has out-of-range location for axis ‘Optical size’`

2. Adding Axis Mapping Custom Parameter + Variable Font Origin
fontmake -g BigShoulders.glyphs -o variable
R: `Error: there must be a mapping for the axis default value 333.59375`

3. Changing manually the default value to 300
fontmaker -m BigShoulders.designspace -o variable
R: `Error: In 'vf.designspace': Generating fonts from Designspace failed: Can't find base (neutral) master in DesignSpace document`

The file has equal names for two masters (for 10pt and 72pt), but when assigning different names, to rule it out as a possible source of trouble, we got:
`Error: Generating fonts from Designspace failed: More than one base master found in Designspace. `

## Expected behaviour

To obtain a working designspace file with valid default master that Fontmake could identify.
To have a more informative error message that could help to solve it

## Resources and exact process needed to replicate

[Big_Shoulders.glyphs.zip](https://github.com/googlefonts/glyphsLib/files/5358165/Big_Shoulders.glyphs.zip)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the three fontmake commands with the attached Big_Shoulders.glyphs.zip and compare the generated designspace files. Inspect GlyphsLib's handling of the default value and master while converting the Glyphs source; done means fontmake can identify one valid default master and the error explains invalid mappings clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.