Skip to content

Commit

Permalink
subset: FeatureVariations may None in GSUB 1.1
Browse files Browse the repository at this point in the history
Fixes #2023
  • Loading branch information
anthrotype committed Jul 27, 2020
1 parent 3ad201c commit e63ecc5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Lib/fontTools/subset/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1635,9 +1635,13 @@ def prune_post_subset(self, font, options):
# table.ScriptList = None

if hasattr(table, 'FeatureVariations'):
if not (table.FeatureList and table.FeatureVariations.FeatureVariationRecord):
# drop FeatureVariations if there are no features to substitute
if table.FeatureVariations and not (
table.FeatureList and table.FeatureVariations.FeatureVariationRecord
):
table.FeatureVariations = None

# downgrade table version if there are no FeatureVariations
if not table.FeatureVariations and table.Version == 0x00010001:
table.Version = 0x00010000

Expand Down

0 comments on commit e63ecc5

Please sign in to comment.