[fonttools/fonttools] 09c59d: [feaLib] Keep lookups across repeated language sta...

1 view
Skip to first unread message

Cosimo Lupo

unread,
Sep 17, 2026, 6:04:15 AM (12 days ago) Sep 17
to fontto...@googlegroups.com
Branch: refs/heads/main
Home: https://github.com/fonttools/fonttools
Commit: 09c59d9fd42f7bacd9f9e6b9a502ca4ad25ecbb6
https://github.com/fonttools/fonttools/commit/09c59d9fd42f7bacd9f9e6b9a502ca4ad25ecbb6
Author: Colin Rofls <co...@cmyr.net>
Date: 2026-09-16 (Wed, 16 Sep 2026)

Changed paths:
M Lib/fontTools/feaLib/builder.py
M Tests/feaLib/builder_test.py
A Tests/feaLib/data/duplicate_language_stmt_include_dflt.fea
A Tests/feaLib/data/duplicate_language_stmt_include_dflt.ttx

Log Message:
-----------
[feaLib] Keep lookups across repeated language statements

Given,

feature smcp {
script latn; language dflt; sub a by A.sc; # 1
script latn; language dflt; sub b by B.sc; # 2
script latn; language TRK; sub c by C.sc; # 3
script latn; language TRK; sub d by D.sc; # 4
} smcp;

the second `language TRK` replaced the lookups registered for latn/TRK
with a fresh copy of latn/dflt, so lookup 3 was dropped. makeotf rejects
the repeated statement outright, and since #3748 the exclude_dflt branch
already accumulates instead of replacing.

With this patch, set_language only ever adds the current default lookups
to a language system (or removes them, for exclude_dflt), and never
replaces the list. This showed up as a crater diff on Estedad, where
fea-rs kept the lookup and feaLib did not.


Commit: 1a5ead24e16d0c53acccd2ec5ad5c3652f54a2ba
https://github.com/fonttools/fonttools/commit/1a5ead24e16d0c53acccd2ec5ad5c3652f54a2ba
Author: Cosimo Lupo <cos...@anthrotype.com>
Date: 2026-09-17 (Thu, 17 Sep 2026)

Changed paths:
M Lib/fontTools/feaLib/builder.py
M Tests/feaLib/builder_test.py
A Tests/feaLib/data/duplicate_language_stmt_include_dflt.fea
A Tests/feaLib/data/duplicate_language_stmt_include_dflt.ttx

Log Message:
-----------
Merge pull request #4189 from cmyr/fealib-set-language-accumulate

[feaLib] Keep lookups across repeated language statements


Compare: https://github.com/fonttools/fonttools/compare/90b9a6c957a1...1a5ead24e16d

To unsubscribe from these emails, change your notification settings at https://github.com/fonttools/fonttools/settings/notifications
Reply all
Reply to author
Forward
0 new messages