googlefonts / googlefonts/fontmake
"No default source" when I have a discrete axis map AND split variable fonts defined
- Dominant language
- Python
- Stars
- 888
- Forks
- 97
- Avg merge
- 4d 52m
- Merged PRs (30d)
- 1
Description
I’m currently using FontMake `3.6.0` (the current release).
I have a designspace which is building well with:
- An `ital` axis with a mapping to make it a discrete, binary, on/off axis
- A single variable font, including the full `ital` range
However, if I also add `variable-font` elements that use just one side or the other of the `ital` range (e.g. split roman vs italic VFs), I get an error.
```
INFO:fontmake.font_project:Building variable fonts variable_ttf/AT-NameSansVariable.ttf, variable_ttf/AT-NameSansVariable-Roman.ttf, variable_ttf/AT-NameSansVariable-Italic.ttf
fontmake: Error: In 'source/ArrowType-NameSans-Prep-v011/name_sans-wght_1_1000-opsz_12_96-ital_0_1--w_sparse_supports--unified.designspace': Generating fonts from Designspace failed: No default source; expected default master at Optical Size=8, Weight=700. Found master locations:
```
However, I _do_ have a source at Optical Size=8, Weight=700:
```xml
```
Here’s my `ital` axis and map:
```xml
```
Here’s my variable-fonts element:
```xml
```
If my variable fonts element is only the first font, things work fine, and that font compiles as expected:
```xml
```
Or, if I remove the `mapping` from my `ital` axis, all three variable fonts build as expected:
```xml
```
As far as I understand things, this should all be working, with both the `ital` mapping and all three variable font outputs.
Here’s my full `axes` element, in case that is helpful. (Click to expand)
```xml
Optical Size
Weight
```
Am I doing something wrong, or missing something?
Thanks so much for any insights here!
Contributor guide
Research direction
Reproduce the failure using the designspace with the discrete `ital` mapping and all three `variable-font` outputs, then compare it with the working single-output and unmapped-axis cases. Trace the handling of default sources and axis subsets; done means all three fonts build successfully while preserving the discrete mapping, with a regression test for the reported configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100