1
0
mirror of https://github.com/google/fonts.git synced 2024-11-28 11:00:21 +03:00

Merge pull request #87 from m4rc1e/stat-fix

build_stat: do not rm fvar axis name records
This commit is contained in:
Marc Foley 2022-10-10 14:33:19 +01:00 committed by GitHub
commit 8a5f552de6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 43 additions and 41 deletions

View File

@ -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:

View File

@ -4,12 +4,12 @@
<DesignAxisRecord>
<Axis index="0">
<AxisTag value="wght"/>
<AxisNameID value="280"/> <!-- Weight -->
<AxisNameID value="256"/> <!-- Weight -->
<AxisOrdering value="0"/>
</Axis>
<Axis index="1">
<AxisTag value="wdth"/>
<AxisNameID value="287"/> <!-- Width -->
<AxisNameID value="257"/> <!-- Width -->
<AxisOrdering value="1"/>
</Axis>
<Axis index="2">
@ -28,56 +28,56 @@
<AxisValue index="0" Format="1">
<AxisIndex value="0"/>
<Flags value="0"/>
<ValueNameID value="281"/> <!-- Light -->
<ValueNameID value="280"/> <!-- Light -->
<Value value="300.0"/>
</AxisValue>
<AxisValue index="1" Format="3">
<AxisIndex value="0"/>
<Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="282"/> <!-- Regular -->
<ValueNameID value="281"/> <!-- Regular -->
<Value value="400.0"/>
<LinkedValue value="700.0"/>
</AxisValue>
<AxisValue index="2" Format="1">
<AxisIndex value="0"/>
<Flags value="0"/>
<ValueNameID value="283"/> <!-- Medium -->
<ValueNameID value="282"/> <!-- Medium -->
<Value value="500.0"/>
</AxisValue>
<AxisValue index="3" Format="1">
<AxisIndex value="0"/>
<Flags value="0"/>
<ValueNameID value="284"/> <!-- SemiBold -->
<ValueNameID value="283"/> <!-- SemiBold -->
<Value value="600.0"/>
</AxisValue>
<AxisValue index="4" Format="1">
<AxisIndex value="0"/>
<Flags value="0"/>
<ValueNameID value="285"/> <!-- Bold -->
<ValueNameID value="284"/> <!-- Bold -->
<Value value="700.0"/>
</AxisValue>
<AxisValue index="5" Format="1">
<AxisIndex value="0"/>
<Flags value="0"/>
<ValueNameID value="286"/> <!-- ExtraBold -->
<ValueNameID value="285"/> <!-- ExtraBold -->
<Value value="800.0"/>
</AxisValue>
<AxisValue index="6" Format="1">
<AxisIndex value="1"/>
<Flags value="0"/>
<ValueNameID value="288"/> <!-- Condensed -->
<ValueNameID value="286"/> <!-- Condensed -->
<Value value="75.0"/>
</AxisValue>
<AxisValue index="7" Format="1">
<AxisIndex value="1"/>
<Flags value="0"/>
<ValueNameID value="289"/> <!-- SemiCondensed -->
<ValueNameID value="287"/> <!-- SemiCondensed -->
<Value value="87.5"/>
</AxisValue>
<AxisValue index="8" Format="1">
<AxisIndex value="1"/>
<Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="290"/> <!-- Normal -->
<ValueNameID value="288"/> <!-- Normal -->
<Value value="100.0"/>
</AxisValue>
<AxisValue index="9" Format="1">
@ -89,7 +89,7 @@
<AxisValue index="10" Format="3">
<AxisIndex value="3"/>
<Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="290"/> <!-- Normal -->
<ValueNameID value="288"/> <!-- Normal -->
<Value value="0.0"/>
<LinkedValue value="1.0"/>
</AxisValue>

View File

@ -4,7 +4,7 @@
<DesignAxisRecord>
<Axis index="0">
<AxisTag value="wght"/>
<AxisNameID value="521"/> <!-- Weight -->
<AxisNameID value="256"/> <!-- Weight -->
<AxisOrdering value="0"/>
</Axis>
<Axis index="1">
@ -33,50 +33,50 @@
<AxisValue index="0" Format="1">
<AxisIndex value="0"/>
<Flags value="0"/>
<ValueNameID value="522"/> <!-- Thin -->
<ValueNameID value="521"/> <!-- Thin -->
<Value value="100.0"/>
</AxisValue>
<AxisValue index="1" Format="1">
<AxisIndex value="0"/>
<Flags value="0"/>
<ValueNameID value="523"/> <!-- ExtraLight -->
<ValueNameID value="522"/> <!-- ExtraLight -->
<Value value="200.0"/>
</AxisValue>
<AxisValue index="2" Format="1">
<AxisIndex value="0"/>
<Flags value="0"/>
<ValueNameID value="524"/> <!-- Light -->
<ValueNameID value="523"/> <!-- Light -->
<Value value="300.0"/>
</AxisValue>
<AxisValue index="3" Format="3">
<AxisIndex value="0"/>
<Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="525"/> <!-- Regular -->
<ValueNameID value="524"/> <!-- Regular -->
<Value value="400.0"/>
<LinkedValue value="700.0"/>
</AxisValue>
<AxisValue index="4" Format="1">
<AxisIndex value="0"/>
<Flags value="0"/>
<ValueNameID value="526"/> <!-- Medium -->
<ValueNameID value="525"/> <!-- Medium -->
<Value value="500.0"/>
</AxisValue>
<AxisValue index="5" Format="1">
<AxisIndex value="0"/>
<Flags value="0"/>
<ValueNameID value="527"/> <!-- SemiBold -->
<ValueNameID value="526"/> <!-- SemiBold -->
<Value value="600.0"/>
</AxisValue>
<AxisValue index="6" Format="1">
<AxisIndex value="0"/>
<Flags value="0"/>
<ValueNameID value="528"/> <!-- Bold -->
<ValueNameID value="527"/> <!-- Bold -->
<Value value="700.0"/>
</AxisValue>
<AxisValue index="7" Format="1">
<AxisIndex value="0"/>
<Flags value="0"/>
<ValueNameID value="529"/> <!-- ExtraBold -->
<ValueNameID value="528"/> <!-- ExtraBold -->
<Value value="800.0"/>
</AxisValue>
<AxisValue index="8" Format="1">
@ -94,14 +94,14 @@
<AxisValue index="10" Format="3">
<AxisIndex value="3"/>
<Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="530"/> <!-- Normal -->
<ValueNameID value="529"/> <!-- Normal -->
<Value value="0.0"/>
<LinkedValue value="1.0"/>
</AxisValue>
<AxisValue index="11" Format="1">
<AxisIndex value="4"/>
<Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="530"/> <!-- Normal -->
<ValueNameID value="529"/> <!-- Normal -->
<Value value="0.0"/>
</AxisValue>
</AxisValueArray>

View File

@ -4,7 +4,7 @@
<DesignAxisRecord>
<Axis index="0">
<AxisTag value="wght"/>
<AxisNameID value="466"/> <!-- Weight -->
<AxisNameID value="256"/> <!-- Weight -->
<AxisOrdering value="0"/>
</Axis>
<Axis index="1">

View File

@ -4,22 +4,22 @@
<DesignAxisRecord>
<Axis index="0">
<AxisTag value="wght"/>
<AxisNameID value="280"/> <!-- Weight -->
<AxisNameID value="256"/> <!-- Weight -->
<AxisOrdering value="0"/>
</Axis>
<Axis index="1">
<AxisTag value="wdth"/>
<AxisNameID value="282"/> <!-- Width -->
<AxisNameID value="257"/> <!-- Width -->
<AxisOrdering value="1"/>
</Axis>
<Axis index="2">
<AxisTag value="ital"/>
<AxisNameID value="286"/> <!-- Italic -->
<AxisNameID value="284"/> <!-- Italic -->
<AxisOrdering value="2"/>
</Axis>
<Axis index="3">
<AxisTag value="ital"/>
<AxisNameID value="286"/> <!-- Italic -->
<AxisNameID value="284"/> <!-- Italic -->
<AxisOrdering value="3"/>
</Axis>
</DesignAxisRecord>
@ -41,7 +41,7 @@
<AxisValue index="2" Format="1">
<AxisIndex value="0"/>
<Flags value="0"/>
<ValueNameID value="281"/> <!-- Medium -->
<ValueNameID value="280"/> <!-- Medium -->
<Value value="500.0"/>
</AxisValue>
<AxisValue index="3" Format="1">
@ -65,32 +65,32 @@
<AxisValue index="6" Format="1">
<AxisIndex value="1"/>
<Flags value="0"/>
<ValueNameID value="283"/> <!-- Condensed -->
<ValueNameID value="281"/> <!-- Condensed -->
<Value value="75.0"/>
</AxisValue>
<AxisValue index="7" Format="1">
<AxisIndex value="1"/>
<Flags value="0"/>
<ValueNameID value="284"/> <!-- SemiCondensed -->
<ValueNameID value="282"/> <!-- SemiCondensed -->
<Value value="87.5"/>
</AxisValue>
<AxisValue index="8" Format="1">
<AxisIndex value="1"/>
<Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="285"/> <!-- Normal -->
<ValueNameID value="283"/> <!-- Normal -->
<Value value="100.0"/>
</AxisValue>
<AxisValue index="9" Format="3">
<AxisIndex value="2"/>
<Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="285"/> <!-- Normal -->
<ValueNameID value="283"/> <!-- Normal -->
<Value value="0.0"/>
<LinkedValue value="1.0"/>
</AxisValue>
<AxisValue index="10" Format="3">
<AxisIndex value="3"/>
<Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="285"/> <!-- Normal -->
<ValueNameID value="283"/> <!-- Normal -->
<Value value="0.0"/>
<LinkedValue value="1.0"/>
</AxisValue>

View File

@ -4,12 +4,12 @@
<DesignAxisRecord>
<Axis index="0">
<AxisTag value="wght"/>
<AxisNameID value="280"/> <!-- Weight -->
<AxisNameID value="256"/> <!-- Weight -->
<AxisOrdering value="0"/>
</Axis>
<Axis index="1">
<AxisTag value="wdth"/>
<AxisNameID value="282"/> <!-- Width -->
<AxisNameID value="257"/> <!-- Width -->
<AxisOrdering value="1"/>
</Axis>
</DesignAxisRecord>
@ -31,7 +31,7 @@
<AxisValue index="2" Format="1">
<AxisIndex value="0"/>
<Flags value="0"/>
<ValueNameID value="281"/> <!-- Medium -->
<ValueNameID value="280"/> <!-- Medium -->
<Value value="500.0"/>
</AxisValue>
<AxisValue index="3" Format="1">
@ -55,19 +55,19 @@
<AxisValue index="6" Format="1">
<AxisIndex value="1"/>
<Flags value="0"/>
<ValueNameID value="283"/> <!-- Condensed -->
<ValueNameID value="281"/> <!-- Condensed -->
<Value value="75.0"/>
</AxisValue>
<AxisValue index="7" Format="1">
<AxisIndex value="1"/>
<Flags value="0"/>
<ValueNameID value="284"/> <!-- SemiCondensed -->
<ValueNameID value="282"/> <!-- SemiCondensed -->
<Value value="87.5"/>
</AxisValue>
<AxisValue index="8" Format="1">
<AxisIndex value="1"/>
<Flags value="2"/> <!-- ElidableAxisValueName -->
<ValueNameID value="285"/> <!-- Normal -->
<ValueNameID value="283"/> <!-- Normal -->
<Value value="100.0"/>
</AxisValue>
</AxisValueArray>