diff --git a/glyphs-reader/src/font.rs b/glyphs-reader/src/font.rs index a4da0dcf..16a00075 100644 --- a/glyphs-reader/src/font.rs +++ b/glyphs-reader/src/font.rs @@ -2534,7 +2534,13 @@ impl TryFrom for Font { metric_names.get(&idx).map(|name| (name.clone(), value)) }) .filter(|(_, metric)| !metric.is_empty()) - .collect(), + .fold(BTreeMap::new(), |mut acc, (name, value)| { + // only insert a metric if one with the same name hasn't been added + // yet; matches glyphsLib's behavior where the first duplicate wins + // https://github.com/googlefonts/fontc/issues/1269 + acc.entry(name).or_insert(value); + acc + }), number_values: from .numbers .iter()