googlefonts / googlefonts/glyphsLib

How is the "default" of an axis determined?

Open
#682 5 comments 0 reactions 0 assignees View on GitHub
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?

![image](https://user-images.githubusercontent.com/45946693/114784587-6f468c80-9d49-11eb-93bb-2821c53dd5c4.png)

## 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.

![image](https://user-images.githubusercontent.com/45946693/114784738-aa48c000-9d49-11eb-97c4-670da63d9f7f.png)

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

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.