Skip to content

Commit

Permalink
Document equivalent PANOSE definitions in glyphsLib
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoolean committed Nov 7, 2024
1 parent 4b06eeb commit f5e25f3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions glyphs-reader/src/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,10 @@ impl CustomParameters {
}

fn panose(&self) -> Option<&Vec<i64>> {
// 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,
Expand Down

0 comments on commit f5e25f3

Please sign in to comment.