googlefonts / googlefonts/glyphsLib
How is the "default" of an axis determined?
- Dominant language
- Python
- Stars
- 201
- Forks
- 56
- Avg merge
- 17m
- Merged PRs (30d)
- 1
Description
## Problem
I am building a font from one Glyphs source that is Roman and a second that is Italic.
The Italic VF was getting a default location of `wght=400`, as expected. However, the Roman VF was getting a default location of `wght=100`, which is the lightest master, but not what I wanted or expected, because it also had a "Regular" master.
## Question
The Glyphs source is transformed into UFOs and a designspace. The designspace gets an axis definition like this:
```xml
```
- What logic is used to determine that `default` value?
- Why might it be different from the Italic Glyphs source?
- Could it be that the `Italic` instance is marked for style-linking, while the Roman `Regular` instance is not (because there is no way to mark it as "Regular" in that section, presumably because it’s redundant with the weight menu above?

## Current solution
It seems that if I add an `Axis Location` custom parameter to the Regular master in the Roman Glyphs source, it gets picked up as the default location.

It seems like maybe this could be logically inferred by glyphsLib, or at least that it should guess in the same way between the similar Roman & Italic sources.
I am mostly filing this issue so that others (including my future self) can find it if they have the same question and are looking for a workaround. However, it would potentially be worth solving in the library itself. So, maintainers – feel free to close or leave open this issue as you see fit.
Thank you!
Contributor guide
Assessment
This issue has not been assessed yet.