Skip to content

ContextSubstFormat2 does not apply when referenced lookup is defined first #1110

@punchcutter

Description

@punchcutter

ContextLookup_test_fonts.zip

Here are two simple mock test fonts to show the issue. The only difference is the lookup order. When the referenced lookup comes first the substitution never happens. Like this:

Fails:
Lookup 1 Single Substitution
Lookup 2 Contextual Substitution (calls Lookup 1)

Works:
Lookup 1 Contextual Substitution (calls Lookup 2)
Lookup 2 Single Substitution

If this same exact setup is done with a Chaining Contextual instead of just Contextual then it works in either order.

The test sequence is 0041,0301. With the two fonts attached I get this output with hb-shape:

bad font: [A=0+600|acutecomb=0@-25,63+0] - sub rule doesn't happen
good font: [A=0+600|acutecomb.alt=0@-25,63+0] - sub rule happens

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