googlefonts / googlefonts/fontmake

FontMake not generating names for default instance of designspace, as I expect

Open
#761 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
888
Forks
97
Avg merge
4d 52m
Merged PRs (30d)
1

Description

## Scenario

- I have a designspace for a variable font with a Weight axis from 300–800 (Light to ExtraBold)
- 300 (Light) is the default Weight value
- I am building with FontMake

## Expectation

At least in the past, I believe that the `name` table would be set up to describe the base instance of a VF, in order to describe the font adequately for legacy systems that can’t parse the `fvar` and other new tables.

So, I would expect:
- `nameID 1` Shantell Sans Light
- `nameID 2` Regular
- `nameID 3` 1.000;ARRW;ShantellSans-Light
- `nameID 4` Shantell Sans Light
- `nameID 6` ShantellSans-Light
- `nameID 16` Shantell Sans
- `nameID 17` Light

I am also getting a FontBakery `WARN`: `Subfamily name for Win is missing. It must be "Light"`. I think this is saying that name `17` should be present, and should be `Light`, as this is the base instance of the variable font.

## Reality

Instead, the font is building with names as if it had a Regular base instance:

- `nameID 1` Shantell Sans
- `nameID 2` Regular
- `nameID 3` 1.000;ARRW;ShantellSans-Regular
- `nameID 4` Shantell Sans Regular
- `nameID 6` ShantellSans-Regular
- `nameID 16` [not present]
- `nameID 17` [not present]

## Further details

FontMake version: `2.4.0`.

problem name table (Click to expand)

```xml



Weight


Light


Regular


Medium


SemiBold


Bold


ExtraBold


Copyright 2021 The Shantell Sans Project Authors (https://github.com/arrowtype/shantell-sans)


Shantell Sans


Regular


1.000;ARRW;ShantellSans-Regular


Shantell Sans Regular


Version 1.000


ShantellSans-Regular


Arrow Type


Stephen Nixon


https://arrowtype.com


https://arrowtype.com


Weight


Light


Regular


Medium


SemiBold


Bold


ExtraBold

```

Designspace (Click to expand)

```xml


































































com.letterror.mathModelPref
previewVarLib
com.letterror.skateboard.interactionSources

horizontal

ignore

vertical

Weight


com.letterror.skateboard.previewLocation

Weight
600.0

com.letterror.skateboard.previewText
0123456789

```

## Solution/Workaround

I think I’ve found a solution/workaround in RoboFont, by adjusting some UFO data:
- I’ve changed `openTypeNamePreferredSubfamilyName` to `Light` – it was previously was `Regular`
- I’ve set `styleMapFamilyName` to `Shantell Sans Light` – it previously wasn’t set.
- I’ve set `openTypeNamePreferredFamilyName` to `Shantell Sans` – it previously wasn’t set.

Apparent workaround in UFOs/RoboFont (Click to expand)

![image](https://user-images.githubusercontent.com/45946693/114313694-870dde80-9ac5-11eb-95c7-e1868f9a0c6b.png)
![image](https://user-images.githubusercontent.com/45946693/114313715-968d2780-9ac5-11eb-8e16-be1550dda3ca.png)

## Remaining question

Even though I’ve found a solution, I don’t understand it as well as I’d like. I suppose my questions become:
- When does info in a UFO override data in a designspace?
- Is there a reason the designspace data doesn’t get privileged, when it seems like this would be a simpler & more-flexible place to set name info? E.g., this would allow simpler exporting of different fonts for different reasons, without having to adjust the UFOs. This _does_ seem to work more in static builds than variable builds, which is helpful.

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.