You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in Glyhps3, global font metrics can define an optional 'filter' to make them apply only to particular classes of glyphs (e.g. the x-height of the small caps glyphs). For setting OS/2 or MVAR metrics, which is font-wide by definition, these should be ignored (i'm not even sure what they are used for within Glyphs.app itself, maybe hinting?).
However they way we collect these metrics into a BTreeMap keyed by metric name, makes is such that the last metric with a given name wins and overwrite the ones that preceed it.
you'll notice the OS/2 and MVAR tables differ from fontmake's. Some masters end up with a different strikeout offset and xheight, because there are GSMetrics with a filter that selects only the x-height of small caps glyphs, which are defined after the default x-height and thus prevails.
In glyphsLib, only the first metric with a given name is actually used, and these filter attributes are completely unused.
So it's tempting to simply do this:
diff --git a/glyphs-reader/src/font.rs b/glyphs-reader/src/font.rs
index f39386de..789248e0 100644
--- a/glyphs-reader/src/font.rs+++ b/glyphs-reader/src/font.rs@@ -2525,7 +2525,12 @@ impl TryFrom<RawFont> for Font {
metric_names.get(&idx).map(|name| (name.clone(), value))
})
.filter(|(_, metric)| !metric.is_empty())
- .collect(),+ .fold(BTreeMap::new(), |mut acc, (name, value)| {+ if !acc.contains_key(&name) {+ acc.insert(name, value);+ }+ acc+ }),
number_values: from
.numbers
.iter()
and then this particular Epilogue.glyphs becomes 'output is identical' in ttx_diff
The text was updated successfully, but these errors were encountered:
in Glyhps3, global font metrics can define an optional 'filter' to make them apply only to particular classes of glyphs (e.g. the x-height of the small caps glyphs). For setting OS/2 or MVAR metrics, which is font-wide by definition, these should be ignored (i'm not even sure what they are used for within Glyphs.app itself, maybe hinting?).
However they way we collect these metrics into a BTreeMap keyed by metric name, makes is such that the last metric with a given name wins and overwrite the ones that preceed it.
fontc/glyphs-reader/src/font.rs
Lines 2526 to 2534 in 51f1bd8
E.g. take this Etcetera-Type-Co/Epilogue
you'll notice the OS/2 and MVAR tables differ from fontmake's. Some masters end up with a different strikeout offset and xheight, because there are GSMetrics with a filter that selects only the x-height of small caps glyphs, which are defined after the default x-height and thus prevails.
In glyphsLib, only the first metric with a given name is actually used, and these
filter
attributes are completely unused.So it's tempting to simply do this:
and then this particular Epilogue.glyphs becomes 'output is identical' in ttx_diff
The text was updated successfully, but these errors were encountered: