Skip to content

Fix variable font weight selection on Linux - #127

Open
teoulas wants to merge 1 commit into
github:mainfrom
teoulas:fix-linux-variable-font-weights
Open

Fix variable font weight selection on Linux#127
teoulas wants to merge 1 commit into
github:mainfrom
teoulas:fix-linux-variable-font-weights

Conversation

@teoulas

@teoulas teoulas commented Aug 6, 2026

Copy link
Copy Markdown

Summary

  • align the Glyphs variable export weight class with its ExtraLight (wght=200) origin
  • update the checked-in variable TTFs so OS/2.usWeightClass matches fvar's default
  • document the metadata invariant in the source build instructions

Fixes #120.

Background

The variable fonts use an ExtraLight master as their Variable Font Origin, so their fvar weight default is 200. The exported TTFs instead reported OS/2.usWeightClass=400.

Fontconfig assumes that usWeightClass describes the default variable instance. The mismatch causes it to expose ExtraLight as Regular and shift the remaining named weights, so applications such as Firefox select ExtraLight for CSS weights through 500.

This change keeps the existing ExtraLight origin and sets the export weight class to 200, matching the approach already used by the Google Fonts build.

Verification

  • installed MonaSansVF[wdth,wght,opsz,ital].ttf on Arch Linux with Fontconfig 2.18.2
  • verified Firefox renders Regular and the other requested weights correctly
  • verified Fontconfig maps ExtraLight, Light, Regular, Medium, SemiBold, Bold, ExtraBold, and Black to their corresponding named instances
  • ran fc-scan successfully on every variable TTF
  • verified the generated TTF changes are limited to OS/2 and the checksum-related head table

I could not regenerate the fonts with Glyphs.app because it is macOS-only and requires a paid license. The checked-in TTFs were patched and tested directly; the corresponding weightClass=200 source setting should be confirmed during the maintainers' next Glyphs export.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Only ExtraLight weight works with variable font on Linux

1 participant