Opsz variable font

I’m trying to get variable fonts with opsz axis to work and hoping I can get some help.

I have two masters in the glyphs file: one for the largest setting and one for the smallest. These are intended for 144pt and 24pt respectively. On the axis I’ve set up in the glyphs file, they are set at 33 for the 144pt cut and 120 for the 24pt cut. (The numbers I’m using are from the stem measurements, so as the intended setting size goes up the plotting on the axis goes down, since the stems get finer larger.)

I gather I want to set up axis mapping as described in the variable font tutorial, but since this is opsz rather than weight I’m a bit confused.

I have a sense of the shape of the curve I want from the instances (styles) I’ve set up:
144pt - 33
90pt - 43
72pt - 50
60pt - 57
48pt - 68
36pt - 85
30pt - 99
24pt - 120

But are these the numbers that go into the mapping table, or do I need to do something more like the tutorial says with weight, that is, set evenly spaced figures in the left column? And these certainly can’t go straight into the parameter, since the parameter expects the extremes to match, right?

And I assume I’ll want to add an Axis Location parameter to the masters, since the intended pt size will be a meaningful number to the user (vs. the stem size in upm). But if I do that do I then need to use that reconfigured (and in this case reversed) set of numbers in the mapping table?

I haven’t tested it yet, but while technically you can reverse the scale just in avar (meaning match 1 to 0 and vice versa), I expect it to not work in some implementations.

What I would do is “fix” the master coordinates to match the extremes (that should be fairly easy), so you can have an axis mapping that does not need to reverse the scale. It may be tedious if you have a lot of instances, but a simple script can help.

There is no requirement for equidistant steps Except on the wght axis. Just keep the resulting slider as accessible as possible, and intervene if you find styles crammed in one corner of the spectrum.

Many months later and I’m still struggling with this, mostly because the math is breaking my brain. Can anyone help me calculate how I can convert the scale above to a set of pairings that go in the same direction, start at the same number, end at the same number, and preserve the proportions in between?
If it matters, the updated and expanded table I’m working with is:
14pt - 224
18pt - 177
24pt - 136
30pt - 112
36pt - 95
48pt - 73
60pt - 60
72pt - 50
90pt - 43
144pt - 32

EDITED TO ADD: Never mind, instead of spending a sixth hour trying to figure out the math, I spent 30 minutes eyeballing it and am satisfied with the results.

1 Like