Variable font setup for one axes but four masters

Hi, so I’m setting up a variable font export. I have 2 axes (weight, width) with 4 masters total.

Thin Condensed
Bold Condensed
Thin Expanded
Bold Expanded

For the variable font I want only the weight axes to be visible, which is easy to do but I want a specific interpolation value of the width axes to be used through that variable weight axes. So not the Condensed master, not the Expanded master but a “Regular” width family with a visible weight axes.

What is the best way to set this up?
Thank you!

  1. Duplicate your .glyphs file
  2. Add the thin and bold width interpolations as instances
  3. Add instance as master for those two
  4. Delete all the other masters
  5. Delete the width axis
  6. Take care of the remaining font info settings. Make sure that there is no font conflict if both the two-axis and the new single-axis fonts get installed simultaneously.
1 Like

Thank you! That was quick! :green_heart:

If you are comfortable with fontTools, you can generate variable font subsets using the varLib.instancer module.

https://fonttools.readthedocs.io/en/latest/varLib/instancer.html

from fontTools import ttLib
from fontTools.varLib import instancer

varFont = ttLib.TTFont("path/to/font.ttf")
subset = ttLib.instantiateVariableFont(varFont, {"wdth": 100})
subset.save("path/to/new/font.ttf")

Oh nice, I will look into it. Thank you!