Fix smart components not decomposed at default location#1894
Merged
anthrotype merged 2 commits intomainfrom Feb 17, 2026
Merged
Fix smart components not decomposed at default location#1894anthrotype merged 2 commits intomainfrom
anthrotype merged 2 commits intomainfrom
Conversation
When a smart component is newly placed without adjusting any slider, Glyphs.app omits the 'piece' attribute, so smart_component_values is empty. fontc currently panics on the assert in instantiate_for_layer. Regression test for googlefonts/glyphsLib#1134
When a smart component is newly placed without adjusting any slider, Glyphs.app doesn't store the 'piece' attribute, so smart_component_values is empty. The check on non-empty values short-circuited and skipped decomposition entirely. Fix by checking the referenced glyph's smart_component_axes as the primary indicator that a component is smart, and default to the axis default value when smart_component_values doesn't specify one. Also rename as_smart_component() to as_component() since it's now a plain enum accessor (matching the existing as_path() pattern), with the smartness determination at the call site. Port of googlefonts/glyphsLib#1135 Fixes #1893
Member
Author
|
https://github.com/googlefonts/fontc/actions/runs/22106385935/job/63890221910?pr=1894#step:6:342 |
dfrg
approved these changes
Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
smart_component_valuessmart_component_axesinstead of the component's valuesas_smart_component()toas_component()since it's now a plain enum accessor (like the existingas_path).Port of googlefonts/glyphsLib#1135
Fixes #1893