Feature suggestion: Kerning + Variable GPOS = Positioning

It’s great that Glyphs now supports variable GPOS in features, but unless I’m missing something there are 2 problems which make it hard to use or even not use at all: it doesn’t work in static files and variable subsets.

That’s not a problem with kerning though! So I wonder if the same mechanism* could handle more complex positioning? Assuming it’s hard or impossible to unscramble variable gpos from features, which of course would be great too. There could be a Positioning window similar to Kerning but with more flexible controls:

— 1 or 4-values positioning like <0 15 0 0>
— Axes location, master or custom: {100, 100}
— Classes defined in features, like @All
— Context instead of left and right, like f' space [T V W Y]
— Lookup reference, perhaps, to show where in features you want that line

A couple of use-cases where I’m stuck at reusing variable GPOS in static and subsets:
fractions (could be done with kerning supporting 4-values positioning (italics need x and y offset))
adjusting intermediate spacing (could be done with kerning supporting custom axes and the features’ classes)
— contextual kerning (could be done with kerning supporting Context)

You need to write the feature code twice and add #if VARIABE … #else … #endif macros to enable the code for each export.

Getting a full custom positioning window to work is difficult. And you always will find use cases that it doesn’t cover yet. There are some aspects that I can find solutions for, others are probably better handled with custom code and tokens. Those can most certainly be improved (e.g. make them variable).

I’ll keep thinking about this.

1 Like

But within that, it’s impossible to define axes ranges (such as “only for italics”), or is it?

Totally! I only outlined some which seemed close to reality, which would already be great to have.

What are you trying to do. Do you mean static or variable here ?

For static. All the examples above involve different pos values in different masters and interpolation between them, so enabling/disabling parts of the feature wouldn’t be enough, I think.

Let’s take adjusting contextual kerning in A’ space V — just like AV, it needs a different value in different weights, widths and probably even italics. The only way to do it now is to use variable GPOS for variable fonts, and then for static the user would have to calculate the value for each instance and apply it through ReplaceFeature custom parameter, which is too complex.

Oh, I figured I might look into writing that Positioning window probably as a filter plugin, but feels more clumsy than some built-in support :smile:

For statics, use number values:

pos A' space V $A_V_Value;

and put the values in the masters settings:

Those will be properly interpolated.

1 Like