]> git.ipfire.org Git - thirdparty/google/fonts.git/commitdiff
Also protect STAT table name IDs from the axis list
authorSimon Cozens <simon@simon-cozens.org>
Wed, 11 Jan 2023 12:10:19 +0000 (12:10 +0000)
committerMarc Foley <m.foley.88@gmail.com>
Wed, 11 Jan 2023 15:59:45 +0000 (15:59 +0000)
Lib/axisregistry/__init__.py

index 7d2ccf68a0bb473c501b15543d1605dc108b4b18..e900b871f701340f27bae440e059c07a3ab7221b 100644 (file)
@@ -338,9 +338,13 @@ def build_fvar_instances(ttFont, axis_dflts={}):
     stat_nameids = []
     if "STAT" in ttFont:
         if ttFont["STAT"].table.AxisValueCount > 0:
-            stat_nameids = [
+            stat_nameids.extend(
                 av.ValueNameID for av in ttFont["STAT"].table.AxisValueArray.AxisValue
-            ]
+            )
+        if ttFont["STAT"].table.DesignAxisCount > 0:
+            stat_nameids.extend(
+                av.AxisNameID for av in ttFont["STAT"].table.DesignAxisRecord.Axis
+            )
 
     # rm old fvar subfamily and ps name records
     for inst in fvar.instances: