This is the process as of 8/8/18 since the current fix-vf-meta.py script does not work on fonts with more than one axis.
- Change
STAT
minor version number to 1. Inname
table, check that all entries and variations of the font name are “Font Italic” or “Font Regular”, and not some odd combo like “Font Regular Italic” - OPTIONAL (Fonts are fine without this step) Copy Windows name records 1–14 to Mac name records, change all IDs after nameID to:
platformID="1" platEncID="0" langID="0x0" unicode="True"
- If the family has italic styles, add a
name
table entry “Italic” if there is not already one present - If the family has a width axis, add the
name
table entries to address the different widths of instances. Entries should address only one axis- Example: “Condensed” and “Normal”
- For a script, perhaps this could look to the values of instances on the
fvar
table and generate a canonical width string accordingly
- Repeat step three for as many additional axes the family has
- In the
STAT
table, add an<Axis>
for Italic (using the same nameID in step3) to the<DesignAxisRecord>
(be sure to updateAxis index
andAxisOrdering value
). Also remove the italic axis fromfvar
table if it is present, and remove all coordinate values for that axis.- The Italic axis does not need to be added to the
fvar
table in families that have separate roman and italic forms. The OT spec acknowledges the axis count of theSTAT
table relative to thefvar
table: “In a font with an 'fvar' table, this value must be greater than or equal to the axisCount value in the 'fvar' table” - Be Careful when removing an axis from the fvar table, you must also remove the respective
VarRegionAxis
in theHVAR
,MVAR
,GDEF
,VVAR
, andBASE
tables - It appears the fonts operate properly on Windows even if the axes do not match up in the
fvar
tables between fonts (i.e. if romans have a widths axis and italics do not)
- The Italic axis does not need to be added to the
- Add
<AxisValueArray>
table toSTAT
table and addAxisValue
’s for all weights these can be format1 or format2- This can be pulled from the
fvar
table, using both thesubfamilyNameID
as theValueNameID value
and the“wght”
value as theValue value
- This can be pulled from the
- Add
AxisValue
’s to theSTAT
table for the additional axes. Width for example would have an entry for Condensed and one for Normal. Can be either format1 or format2 3. Remember to set the appropriate flags for these entries to mark some as default, otherwise the names of instances on Windows will be messed up. - For the roman VF add
AxisValue
Format="3"
with the stringRegular
on the Italic axis. Thevalue
will be0.0
and thelinkedValue
will be1.0
. This should link the Regular VF to the Italic VF- For the
nameID
I like to use the Regular fromnameId
2 since that one is for the family rather than referring to a single style, even though it really makes no difference, a string is a string :) - Remember to set
<Flags value="2"/>
if this is the roman font
- For the
- For the italic VF ad an
Axis value
Format=1
to theSTAT
table, set it to1.0
and have the flag set to0
since the italic style is not the default and should be visible in the name of the font
<STAT>
<Version value="0x00010001"/>
<DesignAxisRecordSize value="8"/>
<!-- DesignAxisCount=3 -->
<DesignAxisRecord>
<Axis index="0">
<AxisTag value="wght"/>
<AxisNameID value="256"/> <!-- Weight -->
<AxisOrdering value="0"/>
</Axis>
<Axis index="1">
<AxisTag value="wdth"/>
<AxisNameID value="257"/> <!-- Width -->
<AxisOrdering value="1"/>
</Axis>
<Axis index="2">
<AxisTag value="wdth"/>
<AxisNameID value="266"/> <!-- Italic -->
<AxisOrdering value="2"/>
</Axis>
</DesignAxisRecord>
<!-- AxisValueCount=7 -->
<AxisValueArray>
<AxisValue index="0" Format="1">
<AxisIndex value="0"/>
<Flags value="0"/>
<ValueNameID value="258"/> <!-- Regular -->
<Value value="400.0"/>
</AxisValue>
<AxisValue index="1" Format="1">
<AxisIndex value="0"/>
<Flags value="0"/>
<ValueNameID value="259"/> <!-- Medium -->
<Value value="500.0"/>
</AxisValue>
<AxisValue index="2" Format="1">
<AxisIndex value="0"/>
<Flags value="0"/>
<ValueNameID value="260"/> <!-- SemiBold -->
<Value value="600.0"/>
</AxisValue>
<AxisValue index="3" Format="1">
<AxisIndex value="0"/>
<Flags value="0"/>
<ValueNameID value="261"/> <!-- Bold -->
<Value value="700.0"/>
</AxisValue>
<AxisValue index="4" Format="3">
<AxisIndex value="2"/>
<Flags value="2"/>
<ValueNameID value="2"/> <!-- Regular -->
<Value value="0.0"/>
<LinkedValue value="1.0"/>
</AxisValue>
<AxisValue index="5" Format="1">
<AxisIndex value="1"/>
<Flags value="0"/>
<ValueNameID value="267"/> <!-- Condensed -->
<Value value="50.0"/>
</AxisValue>
<AxisValue index="6" Format="1">
<AxisIndex value="1"/>
<Flags value="2"/>
<ValueNameID value="268"/> <!-- Normal -->
<Value value="100.0"/>
</AxisValue>
</AxisValueArray>
<ElidedFallbackNameID value="2"/> <!-- Regular -->
</STAT>