Use new axis names

Currently, Glyphs uses weight, width, custom, custom 1–3 as axis names, which inherits the structure from the earlier implementation but no longer makes sense since the support of axes custom parameter. I found it quite awkward while I was updating the Instance Slider script. Weight axis is just the name for the first axis, and if you put Weight as secondary axis, that’s internally width. Why don’t we introduce new axis names and deprecate the old ones in the future?

Also, unrelated minor issue: the Macro Window has tabs, but the tab names are not kept straight. You can end up with a lot of “Macro 7” tabs for example, depending on how you close tabs.

The internal structure is outdated now. But I can’t change it without breaking to much. The .axes properties hide it a bit, so you can avoid the old API in scripts.

Didn’t find a better thread to post this.

(Default) Axis order

  • Weight
  • Width
  • Italic
  • Optical size*
  • Slant

Can you confirm, that currently (like build 1224) you need to put the variable font axes in the same order as the popup of the Axes CP suggests, if you use default axes? Order as seen above.

I just had a report that the Variable Font Preview doesn’t change the axis name to “Italic” which was defined in the second axis. I tried a bit and found what I wrote here above. And I think you also tried to explain this issue to me once, Georg.
If you set the “Italic” axis as the third, everything is fine.

*) BTW: Is it on purpose to be not title-cased?

I’m not aware of any requirement on the order. I need to have a look

If you want a simple mock-up file, let me know :slight_smile:

Do you mean that you can’t change the order in an existing font?

Let’s say you you got axes:

  • Weight
  • Italic

The Variable Font Preview plugin keeps showing “Width” at the second Slider (Axis), while in the Font Info > Masters the second value field is named “Italic”.

If you remove the Italic Axis now, that same field in the Masters panel is now called “Width”.

If you instead set up your Axes

  • Weight
  • Width
  • Italic
    Everything works as expected.

And, if instead of “Italic” you call the second axis anything that is not one of the default axis names, then also everything works as expected.

What version of the Variable Font Preview plugin do you have?

It’s still the python version. The older one. The objective-C version is not finished, because I still couldn’t figure out the not-firing callbacks when the user toggles the preview color button :confused:

In the python version I still use the API with


Hence, when the user sets the second axis to anything else than “Width”, it gets confused.
I’d love to discontinue the python version soon, too much effort to develop 2 entirely different codes for the same frontend.

The objective-C version seems fine with the axes, though. Maybe if you could have a look at that preview-color-button-callback (we had several E-Mails about it), then I can wrap that one up and ship out soon.

One thing out of curiosity: A user reported that the UI is flickering like crazy in High Sierra. I could reporduce it on another High Sierra machine, though it works fine in the older El Capitan and the newer Mojave. Was there something sketchy in High Sierra’s View API?