Add support for "Link Metrics..." custom parameters#1778
Merged
Conversation
acc7700 to
4f8843b
Compare
cmyr
approved these changes
Nov 26, 2025
cmyr
left a comment
Member
There was a problem hiding this comment.
A couple little notes inline, but looks good!
| /// Returns None if no linking is configured, meaning this master uses its own metrics. | ||
| /// | ||
| /// See <https://github.com/googlefonts/glyphsLib/blob/a045b48/Lib/glyphsLib/classes.py#L1641-L1665> | ||
| pub fn metrics_source_id<'a>(&'a self, font: &'a Font) -> Option<&'a str> { |
Member
There was a problem hiding this comment.
Thought: instead of having this kind of annoying method call, could we just compute this when we convert from RawFont to Font, and store it in the master directly?
and provide a method similar to glyphsLib's metricSource that returns the optional master layer id associated with a given master through one of these custom parameters. part of #1716
…etrics custom param is present Fixes #1716 matching glyphsLib and fontmake
Matches glyphsLib... Apparently GSF has dozens of these googlefonts/googlesans-flex#1223
93791af to
2d05fd3
Compare
and get rid of the annoying method call as per review
Member
Author
|
I get identicall ttx-diff output for HVAR and gvar tables for GSF-full.glyphspackage after applying this PR 🎉 |
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.
Fixes #1716
the implementation is intended to match fontmake's (inline comments point to the relevant lines in glyphsLib).
I still haven't had the chance to test this with GSF but will do tomorrow