[fonttools/fonttools] 311f14: [featureVars] Add tests for unsorted FeatureTableS...

1 view
Skip to first unread message

Cosimo Lupo

unread,
Oct 6, 2026, 10:49:36 AM (4 days ago) Oct 6
to fontto...@googlegroups.com
Branch: refs/heads/featurevars-sort-substitution-records
Home: https://github.com/fonttools/fonttools
Commit: 311f14177e1368bb0962694127add30b1502c410
https://github.com/fonttools/fonttools/commit/311f14177e1368bb0962694127add30b1502c410
Author: Cosimo Lupo <cos...@anthrotype.com>
Date: 2026-10-06 (Tue, 06 Oct 2026)

Changed paths:
M Tests/feaLib/builder_test.py
M Tests/varLib/featureVars_test.py

Log Message:
-----------
[featureVars] Add tests for unsorted FeatureTableSubstitution records

When addFeatureVariationsRaw merges new substitution records into an existing
FeatureVariationRecord with the same condition set, they are appended without
re-sorting, so feaLib `variation` blocks sharing a conditionset (and repeated
addFeatureVariations calls) can produce records out of FeatureIndex order. The
spec requires increasing FeatureIndex order. These tests fail until the fix in
the next commit.



To unsubscribe from these emails, change your notification settings at https://github.com/fonttools/fonttools/settings/notifications

Cosimo Lupo

unread,
Oct 8, 2026, 6:53:06 AM (2 days ago) Oct 8
to fontto...@googlegroups.com
Branch: refs/heads/main
Home: https://github.com/fonttools/fonttools
Commit: 311f14177e1368bb0962694127add30b1502c410
https://github.com/fonttools/fonttools/commit/311f14177e1368bb0962694127add30b1502c410
Author: Cosimo Lupo <cos...@anthrotype.com>
Date: 2026-10-06 (Tue, 06 Oct 2026)

Changed paths:
M Tests/feaLib/builder_test.py
M Tests/varLib/featureVars_test.py

Log Message:
-----------
[featureVars] Add tests for unsorted FeatureTableSubstitution records

When addFeatureVariationsRaw merges new substitution records into an existing
FeatureVariationRecord with the same condition set, they are appended without
re-sorting, so feaLib `variation` blocks sharing a conditionset (and repeated
addFeatureVariations calls) can produce records out of FeatureIndex order. The
spec requires increasing FeatureIndex order. These tests fail until the fix in
the next commit.


Commit: a6f7a919806d6e416a41d5fbb8ca1c71290e01b9
https://github.com/fonttools/fonttools/commit/a6f7a919806d6e416a41d5fbb8ca1c71290e01b9
Author: Cosimo Lupo <cos...@anthrotype.com>
Date: 2026-10-06 (Tue, 06 Oct 2026)

Changed paths:
M Lib/fontTools/varLib/featureVars.py

Log Message:
-----------
[featureVars] Sort FeatureTableSubstitution records after merging into an existing record

When addFeatureVariationsRaw reuses a FeatureVariationRecord with the same
condition set, it appended the new substitution records without re-sorting, so
feaLib `variation` blocks sharing a conditionset came out in source order (and
addFeatureVariations could too, after inserting a new feature tag). The spec
requires increasing FeatureIndex order.


Commit: ca2cd65360f8e09866c40d4addccff49d4010343
https://github.com/fonttools/fonttools/commit/ca2cd65360f8e09866c40d4addccff49d4010343
Author: Cosimo Lupo <cos...@anthrotype.com>
Date: 2026-10-08 (Thu, 08 Oct 2026)

Changed paths:
M Lib/fontTools/varLib/featureVars.py
M Tests/feaLib/builder_test.py
M Tests/varLib/featureVars_test.py

Log Message:
-----------
Merge pull request #4248 from fonttools/featurevars-sort-substitution-records

[featureVars] sort FeatureTableSubstitution records after merging into an existing record


Compare: https://github.com/fonttools/fonttools/compare/9d3adb44ed3c...ca2cd65360f8
Reply all
Reply to author
Forward
0 new messages