Branch: refs/heads/fix-chain-context-multi-subst-subtables
Home:
https://github.com/fonttools/fonttools
Commit: 90cd0ade05ea434c808a634829c7e2b02d1ac103
https://github.com/fonttools/fonttools/commit/90cd0ade05ea434c808a634829c7e2b02d1ac103
Author: Cosimo Lupo <
cl...@google.com>
Date: 2026-03-06 (Fri, 06 Mar 2026)
Changed paths:
M Lib/fontTools/feaLib/builder.py
M Tests/feaLib/builder_test.py
A Tests/feaLib/data/chain_context_multi_subst_class.fea
A Tests/feaLib/data/chain_context_multi_subst_class.ttx
M Tests/feaLib/data/contextual_inline_multi_sub_format_2.ttx
Log Message:
-----------
[feaLib] Merge chained multi subst rules with same context (#4016)
When MultipleSubstStatement.build() iterates over glyphs in a class,
add_multi_subst_chained_() was creating a separate ChainContextualRule
for each glyph. This resulted in one Format 3 subtable per glyph,
even when all glyphs shared the same backtrack/lookahead context and
the same lookup.
Now we check if the last rule has identical prefix, suffix, and lookup,
and merge the glyph into the existing rule's coverage set instead.
This matches the behavior of fea-rs for this case.
To unsubscribe from these emails, change your notification settings at
https://github.com/fonttools/fonttools/settings/notifications