HinTak / Font-Validator

Font Validator is a tool for testing fonts prior to release. This testing ensures that fonts meet Microsoft's high quality standards and perform exceptionally well on Microsoft's platform.
Other
146 stars 12 forks source link

False-positive Device table warnings in variable fonts #79

Open Hoolean opened 1 year ago

Hoolean commented 1 year ago

Hello! : )

When Font Validator tests a variable font, it sometimes produces false-positive warnings for Device table values.

Variable fonts may repurpose Device tables as VariationIndex tables, for which 'startSize' and 'endSize' become 'deltaSetOuterIndex' and 'deltaSetInnerIndex' respectively. While Font Validator checks the format of the table before doing most checks, the size fields are interpreted prior to this and – as they contain indices – are often seen as invalid.

This bug can probably be resolved by moving the format check to encompass earliest parts of the function, which the spec suggests here as a means of handling this distinction.

HinTak commented 1 year ago

Sounds like a good issue for somebody to get familiar with the code and send a possible patch.