Skip to content

Pass auto_use_my_metrics=False to ufo2ft for variable fonts#1154

Merged
anthrotype merged 3 commits intomainfrom
dont-use-my-metrics-for-vfs
Aug 27, 2025
Merged

Pass auto_use_my_metrics=False to ufo2ft for variable fonts#1154
anthrotype merged 3 commits intomainfrom
dont-use-my-metrics-for-vfs

Conversation

@anthrotype
Copy link
Member

@anthrotype anthrotype commented Aug 27, 2025

This is fix/prevent the issue described in fonttools/fonttools#3912

Also see the discussion in googlefonts/fontc#1614

The PR is intended to match fontc's default behavior whereby the USE_MY_METRICS glyf component flag is only automatically set for static font builds, and no longer also for variable font builds, where this can be problematic when composite/component glyph metrics are inconsistent across masters and the HVAR table (normally preferred over glyf+gvar phantom points) gets dropped.

This is fix/prevent the issue described in fonttools/fonttools#3912

Also see the discussion in googlefonts/fontc#1614

The PR is intended to match fontc's default behavior whereby the USE_MY_METRICS glyf component flag is only automatically set for static font builds, and no longer also for variable font builds, where this can be problematic when composite/component glyph metrics are inconsistent across masters and the HVAR table (normally preferred over glyf+gvar phantom points) gets dropped.
@anthrotype
Copy link
Member Author

anthrotype commented Aug 27, 2025

fontmake already had a --no-auto-use-my-metrics CLI flag to disable this. The PR adds a positive --auto-use-my-metrics flag as well, to manually opt-in the ufo2ft feature.

By default, fontmake will continue to pass auto_use_my_metrics=True when building static fonts (either from -u single ufos, or from interpolated instances with the -i flag).
But it will pass auto_use_my_metrics=False when building interpolatable master TTFs or variable fonts, unless explicitly told to do --auto-use-my-metrics.

anthrotype added a commit to googlefonts/ufo2ft that referenced this pull request Aug 27, 2025
same as googlefonts/fontmake#1154, for when ufo2ft is called programmatically as opposed to through fontmake CLI
Copy link
Member

@cmyr cmyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks reasonable!

@anthrotype anthrotype merged commit b802a70 into main Aug 27, 2025
15 checks passed
@anthrotype anthrotype deleted the dont-use-my-metrics-for-vfs branch August 27, 2025 15:40
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