google / google/fonts

STAT table errors in variable fonts

Open
#2,391 55 comments 2 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
20.5k
Forks
2.9k
Avg merge
1d 21h
Merged PRs (30d)
95

Description

Since adding STAT table handling to Samsa, I’ve been finding apparent errors in several variable fonts including IBM Plex Sans and Work Sans. (These are the only two Google fonts I have tested, so I can only assume the problem is widespread.)

The issue is that the STAT in the Italic VF repeats the string “Italic” in all the weight entries. Here is a screengrab from Work Sans Italic (WorkSans-Italic-VariableFont_wght.ttf) in Samsa.

![Screenshot 2020-03-13 at 20 59 10](https://user-images.githubusercontent.com/587440/76652000-567c0e00-656e-11ea-9fde-8565fe809544.png)

This leads to incorrect “composed names” such as Light Italic Italic.

![Screenshot 2020-03-13 at 21 00 42](https://user-images.githubusercontent.com/587440/76652290-f3d74200-656e-11ea-899f-bc81be85c5a8.png)

In fact, each of these strings is supposed to refer to a single axis, so the list of strings in Work Sans Italic’s Weight STAT should be: Thin, ExtraLight, Light, Regular, Medium, SemiBold, Bold, ExtraBold, Black. Only then can apps build menus where users select meaningful instance names from one axis at a time.

Work Sans Roman (WorkSans-VariableFont_wght.ttf) has a less important issue where the string “Roman” in the Italic axis should be marked elidable (flag = 2). When fixed, we would see composed names of the form “SemiBold” rather than “SemiBold Roman”. Finally, “Regular” should also be marked elidable in both Roman and Italic.

![Screenshot 2020-03-13 at 21 09 02](https://user-images.githubusercontent.com/587440/76652535-75c76b00-656f-11ea-84ea-dab249a0d766.png)

[Try in Samsa](https://lorp.github.io/samsa/src/samsa-gui.html)

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.