-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
Since FV is always complaining about maxComponentDepth being too small for Iosevka I walked into its source to see how it analyzes the component depth of a particular glyph. And the logic in GetCompositeGlyphStats (https://github.com/Microsoft/Font-Validator/blob/master/OTFontFileVal/val_maxp.cs#L371) seems that, every time you recurse DOWN you increase a counter, which may perform incorrect number in a complex glyph like this:
2785 [
2665 [ <- trigger nComponentDepth++
2601 [ <- trigger nComponentDepth++
2597 [ <- trigger nComponentDepth++
2595 <- trigger nComponentDepth++
2595
]
2595
]
2595
]
2601 [
2597 [ <- trigger nComponentDepth++
2595 <- trigger nComponentDepth++
2595
]
2595
]
]
The recursion depth of glyph 2785 is 4 (2785 → 2665 → 2601 → 2597 → 2595) but FV increased the counter by two more times when looking inside its second reference.
Metadata
Metadata
Assignees
Labels
No labels