+
Skip to content

Conversation

cmyr
Copy link
Contributor

@cmyr cmyr commented Feb 14, 2025

Specifically we were always creating a new ChainContextualRule for each glyph in an input class, even when their replacements were identical, which means we would later miss the chance to use a format3 encoding, which would have been smaller.

The implementation here feels... fine, I guess? In fea-rs we don't decompose the input set, but we also don't support the syntax,

sub a [b c]' d by e f which is supported by fontmake (but has not yet appeared in any font we've handled) which might motivate the decomposition.

lookup.mapping[glyph] = replacements
rule.glyphs[0].add(glyph)

print("reused a mapping")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove stray print - or if you like to keep, turn it into a log.debug perhaps

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops!

Specifically we were always creating a new ChainContextualRule for each
glyph in an input class, even when their replacements were identical,
which means we would later miss the chance to use a format3 encoding,
which would have been smaller.

The implementation here feels... fine, I guess? In fea-rs we don't
decompose the input set, but we also don't support the syntax,

`sub a [b c]' d by e f` which is supported by fontmake (but has not
yet appeared in any font we've handled)
@cmyr cmyr force-pushed the fea-context-format-choice branch from d141f40 to eda024c Compare February 14, 2025 20:28
@cmyr
Copy link
Contributor Author

cmyr commented Feb 14, 2025

huh let's hold off on this for now, I'm seeing some regressions on crater that I will need to investigate..

@cmyr cmyr marked this pull request as draft February 18, 2025 17:05
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 this pull request may close these issues.

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

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载