googlefonts / googlefonts/glyphsLib

GSFont.axis axes on format 2 files with one axis returns two axes

Open
#990 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
201
Forks
56
Avg merge
17m
Merged PRs (30d)
1

Description

When a GSFont object is constructed, it instantiates `.axes` with the default axes, width and weight. Glyphs 3 files specify the axes explicitly, so this is replaced with `GSAxis` objects read from the plist. But Glyphs 2 files don't have an `axes` entry, so they continue to get the default ones. This means that a font which has no meaningful variation on the weight axis still reports *having* a weight axis.

Whether this is correct or wrong is probably a matter of interpretation. I feel like it's wrong, personally.

Contributor guide

Open the contributing guide

Research direction

Start by tracing GSFont construction and the .axes initialization for Glyphs 2 files, then compare it with the GSAxis objects loaded from Glyphs 3 files. Clarify whether a format 2 font with no meaningful weight variation should expose one axis or two, and identify the relevant regression-test entry point. Done means the behavior is explicitly decided and covered by a test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.