Branch: refs/heads/fix-chain-context-multi-subst-subtables
Home:
https://github.com/fonttools/fonttools
Commit: 7e2c8672a2d8158b551d2c315179a4158e77182a
https://github.com/fonttools/fonttools/commit/7e2c8672a2d8158b551d2c315179a4158e77182a
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/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