Skip to content

[feaLib] _upgrade_mixed_subst_statements does not account for all possible lookup breaks #3846

@cmyr

Description

@cmyr

Another little issue with #3805.

Consider the following FEA:

feature derp {
    sub x by y;
    lookupflag 4;
    sub f i by one;
} derp;

because the logic in up (

def _upgrade_mixed_subst_statements(statements):
) only considers the sub statements, it ends up turning the sub x by y rule into a ligature lookup, even though the subsequent lookupflag statement means it is not in the same lookup as the subsequent ligature sub rule.

The same miscompilation can also occur, for instance, with FEA like:

lookup ther {
sub l by j;
} ther ;

feature clig {
    sub a by b;
    sub e l l' lookup lookup_1;
    sub e l f by z;
} clig;

where the contextual rule in the middle forces a new lookup, and we end up giving the first rule the wrong lookup type.

(ultimately this is another one where the question is, 'do we care'?)

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