From: Marc Foley Date: Mon, 10 Oct 2022 10:55:47 +0000 (+0100) Subject: build_stat: do not rm fvar axis name records X-Git-Tag: v0.3.7^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80f6d80493b68a721bc55bc206a001af0aaeba73;p=thirdparty%2Fgoogle%2Ffonts.git build_stat: do not rm fvar axis name records --- diff --git a/Lib/axisregistry/__init__.py b/Lib/axisregistry/__init__.py index f90a6b1064..162240c88a 100644 --- a/Lib/axisregistry/__init__.py +++ b/Lib/axisregistry/__init__.py @@ -176,7 +176,9 @@ def build_stat(ttFont, sibling_ttFonts=[]): fvar = ttFont["fvar"] # rm old STAT table and associated name table records - fvar_nameids = set(i.subfamilyNameID for i in fvar.instances) + fvar_instance_nameids = set(i.subfamilyNameID for i in fvar.instances) + fvar_axis_nameids = set(a.axisNameID for a in fvar.axes) + fvar_nameids = fvar_axis_nameids | fvar_instance_nameids if "STAT" in ttFont: stat = ttFont["STAT"] if stat.table.AxisValueCount > 0: diff --git a/tests/data/OpenSans-Italic[wdth,wght]_STAT.ttx b/tests/data/OpenSans-Italic[wdth,wght]_STAT.ttx index 697c5fd642..6b82b0fcfd 100644 --- a/tests/data/OpenSans-Italic[wdth,wght]_STAT.ttx +++ b/tests/data/OpenSans-Italic[wdth,wght]_STAT.ttx @@ -4,12 +4,12 @@ - + - + @@ -28,56 +28,56 @@ - + - + - + - + - + - + - + - + - + @@ -89,7 +89,7 @@ - + diff --git a/tests/data/OpenSansCondensed-Italic[wght]_STAT.ttx b/tests/data/OpenSansCondensed-Italic[wght]_STAT.ttx index b06952991d..bd39b5cc82 100644 --- a/tests/data/OpenSansCondensed-Italic[wght]_STAT.ttx +++ b/tests/data/OpenSansCondensed-Italic[wght]_STAT.ttx @@ -4,7 +4,7 @@ - + @@ -33,50 +33,50 @@ - + - + - + - + - + - + - + - + @@ -94,14 +94,14 @@ - + - + diff --git a/tests/data/OpenSansCondensed[wght]_STAT.ttx b/tests/data/OpenSansCondensed[wght]_STAT.ttx index ff14aa6a76..503f3a4d34 100644 --- a/tests/data/OpenSansCondensed[wght]_STAT.ttx +++ b/tests/data/OpenSansCondensed[wght]_STAT.ttx @@ -4,7 +4,7 @@ - + diff --git a/tests/data/OpenSans[wdth,wght]_STAT.ttx b/tests/data/OpenSans[wdth,wght]_STAT.ttx index 64edce6cf3..7ab8b63e42 100644 --- a/tests/data/OpenSans[wdth,wght]_STAT.ttx +++ b/tests/data/OpenSans[wdth,wght]_STAT.ttx @@ -4,22 +4,22 @@ - + - + - + - + @@ -41,7 +41,7 @@ - + @@ -65,32 +65,32 @@ - + - + - + - + - + diff --git a/tests/data/Wonky[wdth,wght]_STAT.ttx b/tests/data/Wonky[wdth,wght]_STAT.ttx index b35d267567..65605ac9e7 100644 --- a/tests/data/Wonky[wdth,wght]_STAT.ttx +++ b/tests/data/Wonky[wdth,wght]_STAT.ttx @@ -4,12 +4,12 @@ - + - + @@ -31,7 +31,7 @@ - + @@ -55,19 +55,19 @@ - + - + - +