From f5e25f3620ece9f80d7172d67475783cdde8fdb1 Mon Sep 17 00:00:00 2001 From: Harry Dalton Date: Thu, 7 Nov 2024 21:18:59 +0000 Subject: [PATCH] Document equivalent PANOSE definitions in glyphsLib --- glyphs-reader/src/font.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/glyphs-reader/src/font.rs b/glyphs-reader/src/font.rs index 875fd34f..80c5d4f4 100644 --- a/glyphs-reader/src/font.rs +++ b/glyphs-reader/src/font.rs @@ -437,6 +437,10 @@ impl CustomParameters { } fn panose(&self) -> Option<&Vec> { + // PANOSE custom parameter is accessible under a short name and a long name: + // https://github.com/googlefonts/glyphsLib/blob/050ef62c/Lib/glyphsLib/builder/custom_params.py#L322-L323 + // ...with the value under the short name taking precendence: + // https://github.com/googlefonts/glyphsLib/blob/050ef62c/Lib/glyphsLib/builder/custom_params.py#L258-L269 match self.get("panose").or_else(|| self.get("openTypeOS2Panose")) { Some(CustomParameterValue::Panose(values)) => Some(values), _ => None,