googlefonts / googlefonts/fontmake
Only a partial axis map is generated from GlyphsApp to a variable font
- Dominant language
- Python
- Stars
- 888
- Forks
- 97
- Avg merge
- 4d 52m
- Merged PRs (30d)
- 1
Description
Currently, when I generate a variable font using FontMake, it is only generating a partial weight axis map. As a result, the "Regular" instance is at `wght=391.6666717529297`, rather than `400`.
## The Setup
I'm working in https://github.com/thundernixon/FiraCode/tree/qa/googlefonts-qa.
As a quick way to replicate my results, you can just be in that `qa` branch, and build with:
```
fontmake -g FiraCode.glyphs -o variable --output-dir distr/variable_ttf
```
My GlyphsApp source is set up with specific `weightClass` parameters for all instances, like the following:

It does have one instance at `450`, which is a bit unique, but as shown below, shouldn't necessarily be a blocker.

There is also an `Axis Location` parameter for each master, like this:

However, the designspace generated from this gets the `wght` axis map of:
```
```
This results in an incorrect value for intermediate instances.
_However,_ if I manually paste the below code into the designspace, and then build from that, it works as expected.
```
```
With default, generated designspace:
[FiraCode-VF-incorrect.ttf.zip](https://github.com/googlei18n/fontmake/files/3035842/FiraCode-VF-incorrect.ttf.zip)
With corrected designspace (working correctly(:
[FiraCode-VF-correct-weights.ttf.zip](https://github.com/googlei18n/fontmake/files/3035790/FiraCode-VF-correct-weights.ttf.zip)
## Related
This is related to https://github.com/googlei18n/fontmake/issues/540 in that it is the same font, and has continued issues with weights and instances. I closed that thinking I was in the clear, only to later realize that there was a lingering problem. Still, this problem is a distinct one. I could potentially just correct the designspace as a step in the build process, but that seems like a hacky and brittle solution.
Is there anything I'm missing on my end, or is this something that might be an issue in FontMake/FontTools?
Contributor guide
Assessment
This issue has not been assessed yet.