For TrueType fonts with the maximum number of glyphs, the code below early returns because the range of u16 is exceeded, leading to loca table parsing failing:
|
let actual_total = match format { |
|
IndexToLocationFormat::Short => data.len() / 2, |
|
IndexToLocationFormat::Long => data.len() / 4, |
|
}; |
|
let actual_total = u16::try_from(actual_total).ok()?; |
This in turn means that no outlines can be produced.
Having the maximum number of glyphs is not that uncommon in CJK fonts, e.g. Source Han Sans or Noto Serif CJK.
For TrueType fonts with the maximum number of glyphs, the code below early returns because the range of u16 is exceeded, leading to
locatable parsing failing:ttf-parser/src/tables/loca.rs
Lines 46 to 50 in 6e75b3c
This in turn means that no outlines can be produced.
Having the maximum number of glyphs is not that uncommon in CJK fonts, e.g. Source Han Sans or Noto Serif CJK.