The following code works for variable fonts, but not for standard OpenType fonts (.otf). Only the default value is used here. Have I perhaps overlooked something?
Variable feature code is currently only ever used for variable fonts. That’s why it is recommended to put it in #ifdef VARIABLE … #endif block: Conditional Feature Code — Glyphs Handbook
For static instances, you can define a number value in the masters and put in the values you need in each master. You can give the number value a descriptive name, I used kern1:
Ok, I had somehow understood it differently in the “learn” article.
Anyway, thanks for the clarification.
# Automatic Code
pos f' 50 (wdth:150) 95 space [T V W Y];
The above piece of code means that, in the origin master, f will get an extra 50 units of space if it appears before space followed by any of the glyphs in [T V W Y]. In an extended style, or in other words, at designspace coordinate (wdth:150), that same extra space is 95 instead of 50. And the best thing: along the width axis, this value will interpolate for every instance, and even variable fonts. Pretty cool…