Custom axis mappings for side bearings?

Somehow not finding the answer to this. Apologies if this has been asked before:

I’m working on a font family which will be in 6 weights (ExtraLight to Bold). So far, I’ve built ExtraLight and Bold, and the other weights are set up in the Exports tab – (which I think are referred to as instances?)

I’ll be exporting OT/TTF. I’d like to avoid building and spacing all 6 weights. The thing is: I don’t want side bearings to extrapolate linearly. See attached graphic for an exaggerated idea of what I’d like to achieve.

Can I do custom axis mappings for sidebearings? Do I have to make additional weights, or can instances be made to achieve this purpose?

The objective is to have harmony in the letter spacing between weights. How is this normally achieved?

In ‘Designing Type’ by Karen Cheng, page 52, she discusses how letter spacing should mirror counters at normal weights, but the exception is at very light or very heavy weights. The idea is that light fonts with large counters should not have correspondingly large side bearings, which would result in words that don’t feel bound together. Conversely, heavy fonts (with small counters) actually need a bit more space between them to avoid letters merging into a dark spot.

I suspect you’ll need to build masters from your instances and then adjust their spacing. Where neighboring segments of your graph are straightish, you can probably skip that as a master. In other words, adding demibold and regular will get you most of the way there.
With most designs that go from bold to extra light, I’d say you’ll wind up needing an intermediate master or two just for controlling the shapes anyway.

This seems similar to this topic:

I would probably tackle this with a relatively basic script.
The idea is quite simple: before export, add as many intermediate masters as you want (purely interpolated) and then add/subtract x units on LSB/RSB for each glyph in these masters. You can then delete these masters again after exporting.

Georg’s linked suggestion above is more robust, probably. Saves you a lot of hassle.

It might work with a transform filter for the instances. It can add a few units to each LSB and RSB.

That’s what I meant by your linked suggestion above :slightly_smiling_face:

One note: In order to make this work for variable fonts, you’ll need the extra masters. For static exports, the transform filter approach is probably a lot better.

For variable fonts, it might be possible with variable GPOS. I have never tried this, so it might be work, yet. I’ll have a look.

AFAIR it works with one axis, but gets weird with multiple (or I never figured out the syntax).

It would be a very useful feature to have — loosing up Regular compared to what’s interpolated between arguably more tight Light and Black indeed makes sense in many cases.

Thank you, this is all super helpful!

It’ll be fixed outputs TTF/OT, not variable. I’m hoping the various weights will have visual continuity and worry adding extra masters might make that more difficult.

I have the curves and spacing on the bold font where I like them. I have curves for ExtraLight where I want them, but am still working on spacing.

What’s a common approach to workflow when designing a family? Seems like having the Bold and ExtraLight done first would make sense. But I’ve seen designers on YouTube do Regular then bold, then light. Is there a workflow that people find particularly useful to create harmonious spacing between weights?

In terms of learning to do transform filter for instances, I wonder if “Scripting Glyphs, part 1” might be a good place to start. Thanks for the suggestion.

I’d also like to say that working in Glyphs has brought me so much enjoyment. And this community is so very positive and supportive. So thanks to all!

Just add the Filter custom parameter to the instances with the following text and adjust the left/right side bearing as you want them:

Either way works. Starting from the edges is of course less work, but it requires a bit of experience and imagination to know what Regular is going to be. Also, the wider the range, the more corrections the Regular/Medium area needs — sometimes you can get away with a few special layers, other times you need the full master.

Note that the middle master doesn’t have to be Regular or match any exporting instance. You can find the “breaking point” at which the corrections make most sense, independent from where the instances are going to be, so it won’t affect the progression continuity.

This is a common approach: Family Stem Weights Calculator — Diacritics Club (I think there was a script doing that in Glyphs)

Thank you, this is so helpful! The script sounds fairly easy to do. And the Family Stem Weights calculator seems very handy.