STAT table for combined roman+italic files (Fontbakery)

Hello, I need some help understanding what’s going on. I have a variable font that includes an ital axis (0–1).

I get:

Check ID: <FontBakeryCheck: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.

⚠️ MyFontVF-Regular.ttf

⚠️ 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]

I have set up my variable font setting using “Regular” as the name. As mentioned, I set up my ital axis as going from 0 to 1. What else do I need to do?

I been fiddling around with it in ttx lately, and this is what worked:
https://christoph.koe.berlin/_temp/STAT.ttx
I hope it helps!

Can you post your STAT here?

For ital, you need Regular at 0.0, elidable, in Format 3, linking to 1.0. And an Italic at 1.0, but in Format 1.

Glyphs usually does that fine by default.

I see. Maybe I’m missing something in my variable font setting. What custom parameters do I need to set? Currently, I have no custom parameters set (except for fileName).

I had a look at the file you mentioned to me in DM.

  1. Axis Location parameters were incomplete. The script Set Weight Axis Locations in Instances fixes this automatically. (In the font you sent me, you don’t need Axis Location parameters at all because they always coincide with the internal coordinates; so in this case, you could also delete them all.)
  2. Glyphs indeed has an issue with getting the STAT entry for the Regular on the ital axis. You can fix this by adding a parameter called Italic Style Linking (value: on) to the variable font setting.
1 Like

Thank you.

I completed the axis location parameters for all instances. This didn’t change anything on the result. Removing all axis location parameters also didn’t change anything.

The custom parameter italic style linking also didn’t fix it, sadly. Did you get it to work with the file I provided?

Okay, there are a couple of ways to take control of STAT. The easiest is the mekkablue > Post Production script Read and Write STAT Axis Values.

  1. Export the OTVAR.
  2. Run the script once. There are now Axis Values parameters in your Variable Font Setting in Font Info > Exports. They describe the STAT table that currently is in the exported TTF.
  3. Edit it to your liking, the basic syntax is: axisTag; value=name, value=name, ..., the value name pairs are: value=name (format 1), value>linkedValue=name (format 3) and in case you need it, minValue:nominalValue:maxValue=name (format 2). Add an asterisk * after a name for marking it as elidable.
  4. Run the script again, and the Axis Values are written into the TTF.

This setup creates an A-OK STAT table:

wdth; 75=Condensed, 100=Regular*, 125=Expanded
wght; 200=Extralight, 300=Light, 400>700=Regular*, 500=Medium, 600=Semibold, 700=Bold, 800=Extrabold, 900=Black
ital; 0>1=Regular*, 1=Italic

Adapt to your needs, I see you have some non-standard style name shortenings (which may have confused the algorithm in the first place).

1 Like

Thanks a lot! I’m currently having a closer look at this and will get back to you in case any more problems arise.

@SCarewe can you send me that file, too? The algorithm should be able to generate the list listing Rainer posted and I like to check why it didn’t.

Find it here: GitHub - eweracs/mona-sans at v1.1-shape-fixes

Note: with Rainer’s tips, I got it to work correctly. Thanks!

I’ll need to check whether I only need to add the Italic Style Linking parameter on “normal” families, because I’ve always had this issue, even with the most simple setups.

Small request, would there be the possibility of adding an option to define a custom last variable font export path? Currently, it’s Glyphs.defaults["GXExportPathManual"], but since I use a custom plugin to export variable fonts, that default doesn’t reflect the actual location of my last export.

Setting a custom parameter such as VF Export Location with a relative path (such as ./Exports/1.005/VAR) would be really useful.

15 posts were split to a new topic: Why negative values for Slant axis?

Which custom plug-in?

I’d rather not hardcode the export location in the file. Very error-prone. Then it is easier to update GXExportPathManual or simply export once through the regular UI.