Skip to content

Font for GPOS-2 test is technically not valid #61

@Jongware

Description

@Jongware

The second test in "GPOS–2: Coverage in Pair Adjustment Positioning" is not a valid test. It checks if a renderer picks the first of two equally matching sets:

"The second subtable has two PairSets, both kerning .."

but in the associated font "TestGPOSTwo.otf", the value of PairSetCount (2) is not equal to the length of its Coverage list (1). This is not correct according to the OpenType specifications for GPOS Pair Adjustment, PosFormat 1:

"The PairSet array contains one offset for each glyph listed in the Coverage table and uses the same order as the Coverage Index."

so the PairSetCount should have been 1 as well (and then there is nothing to test against left). Testing with a technically invalid font may lead to undefined behavior, and the offered scenario is not unique in this – all other tests would suffer the same fate if their fonts are invalid.

I recommend this test be removed from the test suite.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions