diff options
author | robot-piglet <[email protected]> | 2025-08-29 11:40:50 +0300 |
---|---|---|
committer | robot-piglet <[email protected]> | 2025-08-29 12:04:59 +0300 |
commit | eb4fa69a58c58a2f36a4cda1b61972ad7037eee6 (patch) | |
tree | 35d7c1d1f7ce3cb83cd04bedd711ab451719882c /contrib/python/fonttools/fontTools/feaLib/builder.py | |
parent | ccfbaaf1ad9afe621cb75dc5296d2e0de0e758b4 (diff) |
Intermediate changes
commit_hash:efca680e102a12bb0a656779dafefc81261b3eac
Diffstat (limited to 'contrib/python/fonttools/fontTools/feaLib/builder.py')
-rw-r--r-- | contrib/python/fonttools/fontTools/feaLib/builder.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/python/fonttools/fontTools/feaLib/builder.py b/contrib/python/fonttools/fontTools/feaLib/builder.py index 25b319c0b01..0d253222552 100644 --- a/contrib/python/fonttools/fontTools/feaLib/builder.py +++ b/contrib/python/fonttools/fontTools/feaLib/builder.py @@ -926,6 +926,11 @@ class Builder(object): l.lookup_index for l in lookups if l.lookup_index is not None ) ) + # order doesn't matter, but lookup_indices preserves it. + # We want to combine identical sets of lookups (order doesn't matter) + # but also respect the order provided by the user (although there's + # a reasonable argument to just sort and dedupe, which fontc does) + lookup_key = frozenset(lookup_indices) size_feature = tag == "GPOS" and feature_tag == "size" force_feature = self.any_feature_variations(feature_tag, tag) @@ -943,7 +948,7 @@ class Builder(object): "stash debug information. See fonttools#2065." ) - feature_key = (feature_tag, lookup_indices) + feature_key = (feature_tag, lookup_key) feature_index = feature_indices.get(feature_key) if feature_index is None: feature_index = len(table.FeatureList.FeatureRecord) |