googlefonts / googlefonts/glyphsLib

Caution: GSInstance.type == "variable"

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

Description

I just submitted a [PR](https://github.com/googlefonts/glyphsLib/pull/812) that implements `GSInstance.type`.

Glyphs 3 implemented a "variable" instance that is a pseudo instance for VF settings.
In my particular case, this messed with the `instance_mapping` as that instance would overwrite the `designLoc` back to 0, preventing correct entry of an axis’ default location. The PR fixes that.

I'm writing this issue as a heads-up about other fallout from this new instance type.

For instance, it shows up in designspace documents as a separate instance. Interestingly, the instance won't end up in the `fvar` table of an actual font. There may be code in place to prevent a duplicate instance (the new instance has a name of "Regular") from making it into the font. But in my case the "variable" instance is located at the end of the instance list. What if it's at the beginning and the rightful Regular instance would get ignored instead?

The extent of fallout of this is unfathomable for me. Someone else needs to dive into this. What I know is that Glyphs 3 VF sources that I get on my table increasingly include this "variable" instance for settings.

Contributor guide

Open the contributing guide

Research direction

Start with PR #812 and the handling of GSInstance.type and instance_mapping. Trace how a Glyphs 3 "variable" instance enters designspace documents and how instances are selected for the font's fvar table, including when it appears before or after a Regular instance. Done means the variable instance no longer causes incorrect design locations or displaces the rightful Regular instance, with the behavior verified in relevant conversion tests.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.