Skip to content

Add identity mapping fallback for custom axes#2001

Merged
cmyr merged 1 commit intomainfrom
custom-axis-identity-mapping
May 4, 2026
Merged

Add identity mapping fallback for custom axes#2001
cmyr merged 1 commit intomainfrom
custom-axis-identity-mapping

Conversation

@cmyr
Copy link
Copy Markdown
Member

@cmyr cmyr commented May 3, 2026

Fonts with custom axes (e.g. YEAR) can have instances that lack "Axis Location" custom parameters. Previously, these instances contributed no mapping entry, causing a MissingMappingForDesignCoord crash. This adds a fallback for non-wght/wdth axes: if no Axis Location CP is present, use an identity mapping (user = design), matching glyphsLib's AxisDefinition.get_user_loc() behavior.

Fixes crash on dancoull/ClimateCrisis.

Fonts with custom axes (e.g. YEAR) can have instances that lack "Axis
Location" custom parameters. Previously, these instances contributed no
mapping entry, causing a MissingMappingForDesignCoord crash. This adds
a fallback for non-wght/wdth axes: if no Axis Location CP is present,
use an identity mapping (user = design), matching glyphsLib's
AxisDefinition.get_user_loc() behavior.

Fixes crash on dancoull/ClimateCrisis.
@cmyr cmyr added this pull request to the merge queue May 4, 2026
Merged via the queue into main with commit b88f489 May 4, 2026
13 checks passed
@cmyr cmyr deleted the custom-axis-identity-mapping branch May 4, 2026 18:44
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.

2 participants