googlefonts / googlefonts/fontmake

Only a partial axis map is generated from GlyphsApp to a variable font

Open
#543 11 comments 0 reactions 0 assignees View on GitHub
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:

![image](https://user-images.githubusercontent.com/7355414/55433802-20639b00-5564-11e9-986e-974fd244543b.png)

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

![image](https://user-images.githubusercontent.com/7355414/55433807-25c0e580-5564-11e9-8ceb-7cb042b4f427.png)

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

![image](https://user-images.githubusercontent.com/7355414/55434163-ecd54080-5564-11e9-8705-cf56757c6ffa.png)

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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.