8000 [feaLib] more suboptimal compilation of inline multiple sub rules? · Issue #3769 · fonttools/fonttools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[feaLib] more suboptimal compilation of inline multiple sub rules? #3769

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cmyr opened this issue Feb 14, 2025 · 0 comments · May be fixed by #3770
Open

[feaLib] more suboptimal compilation of inline multiple sub rules? #3769

cmyr opened this issue Feb 14, 2025 · 0 comments · May be fixed by #3770

Comments

@cmyr
Copy link
Contributor
cmyr commented Feb 14, 2025

See #3551 for context.

I'm running into something where it looks like feaLib is missing an optimization?

Given the following FEA,

@abc = [a-c];
@def = [d-f];

feature psts {
    lookup test {
        sub @abc' @def @abc by NULL;
    } test;
} psts;

Although feaLib is reusing the contextual lookup, it is creating a new 'rule' for each item in the input class (

chain.rules.append(ChainContextualRule(prefix, [{glyph}], suffix, [sub]))
) even though the items should be able to all share the same rule, since they all have the same target.

I think there's a reasonable solution, here, which is to look for a reusable rule in the same way that we look for a reusable lookup, and I'm going to see if this is trickier than it sounds.

@cmyr cmyr linked a pull request Feb 14, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant
0