STAT Table : Slant & Italic

I’m puzzled as to why the STAT Table has both Slant and Italic entries when I’m only using the Slant axis (slnt) in my .glyphs file. I noticed this inconsistency after a Font Bakery check flagged it.

com.google.fonts/check/italic_axis_in_stat_is_boolean

Check that the value of the 'ital' STAT axis is boolean (either 0 or 1), and elided for the Upright and not elided for the Italic, and that the Upright is linked to the Italic.

MyFont.ttf
WARN :
STAT table 'ital' axis has wrong value. Expected: 0, got '1.0'. [code: wrong-ital-axis-value]

WARN :
STAT table 'ital' axis flag is wrong. Expected: 2 (elided) Got: '0' [code: wrong-ital-axis-flag]

WARN :
STAT table 'ital' axis is not linked to Italic. [code: wrong-ital-axis-linkedvalue]
```

Oh, strange. I’ve just noticed this as well. I’ve set up only a Slant axis in my Glyphs source, but a Glyphs VF export has inserted an Italic axis into the STAT table. This has happened even though the fvar only includes the Weight and Slant axes, as expected.

I’ve been having the same problem here on a wght+slnt family.

A few days ago I didn’t know much about STAT tables, but I think I’ve somewhat wrapped my head around this. The STAT table contains defined positions for each axis, so if the font has an ital axis and contains both Roman and Italic styles, two positions will be defined (ital=0, ital=1). Usually each axis has at least 2 positions defined, which correspond with the interpolable range of values on that axis, but ital sometimes has only 1 value. This happens when a variable font family has separate files for Roman and Italic, then they should each contain only one axis value (ital=0 in the Roman, ital=1 in the Italic).

All three warnings we’re seeing essentially mean that Fontbakery has identified a single-value ital axis in the font, but the value, flag, and style link are indicating that the font is Italic, which raises this warning because Fontbakery doesn’t see any other evidence that the font is Italic (I believe it checks for italic keywords in the name table and checks for a non-zero italicAngle property).

So, if I’ve got that all correct, then I’m perplexed why Glyphs is adding a single-value ital axis (implying the font contains Roman or Italic) in the first place, when a slnt axis is present (implying the font has Roman and Italic).

Nothing wrong with that though it ought to be ital=0. The ital definition should always be there so a UI knows whether to treat this font as a Roman/Upright or as a (potentially style-linked) Italic.

If you intend to use your slnt maximum as the Italic, then slnt is the wrong axis to use. Should be ital, with a range from 0 to 1 (can be solved with axis location parameters).

Or, you define your own STAT table:

  1. Make sure you have a variable font setting in File > Font Info > Exports, and export once as variable font.
  2. Run Script > mekkablue > Post Production > Read and Write STAT Axis Values
  3. Go to File > Font Info > Exports, pick your variable font setting and edit the Axis Values custom parameters the script just created:

    One parameter per axis, always start with the axis tag, followed by a semicolon, then define the axis positions always with the scheme value=Name, e.g. 300=Light, separate them with commas. The word Regular gets an asterisk, marking it as elidable, e.g., 100=Regular* for the Width axis. Style linking is done with value>linkedValue, always for the regular/normal value, e.g., 400>700=Regular*, linking 700 (Bold) to 400 (Regular) on the Weight axis.
  4. Run the script again, now it will look for the latest VF export and overwrite the STAT table. Detailed report in the Macro Window.

My advice: Keep your ital axis but with ital; 0=Regular*

1 Like

These are some really interesting details, Rainer – thanks for providing more context here! I don’t quite know what to think about it so far.

I am still slightly surprised that the Italic axis is indicated in the STAT table, and doubly surprised to realize that it’s indicated as being at a value of 1. Is that indicating an expectation that there would be a more “roman” counterpart to such a font? Or, does setting it to 1 somehow make the Italic style linking work within the single, wght+slnt variable font?

That probably means that your VF origin has an Italic Angle other than 0. You can try adding an italicAngle parameter (value 0) to your Variable Font Setting or an Italic Style Linking parameter.

1 Like

Thanks for the quick suggestions!

Hmm, the origin location master has an Italic Angle set to 0°, and the origin location Export has no Italic Angle set.

I’ve just tried adding the italicAngle to the VF export, but I still see the following in the resulting STAT table, for the only ital entry:

      <AxisValue index="8" Format="1">
        <AxisIndex value="2"/>
        <Flags value="0"/>
        <ValueNameID value="289"/>  <!-- Italic -->
        <Value value="1.0"/>
      </AxisValue>

I’m not seeing any *Italic Style Linking parameter in the Variable Font export or in the font overall. Where can I find that one?

That’s a custom parameter, but only in recent betas.