Using Glyphs 2 (can’t use Glyphs 3 as the project has to be built with fontmake), I need to do contextual GPOS adjustements but the adjustment values different for different masters and I don’t know if there is a way to do this.
Say I want to do the following (the actual code will be a bit more complex) but the -50 should be -70 in Black master and -60 in Light master:
pos behDotless-ar.init dotbelow-ar' <-50 0 0 0> alef-ar.fina;
One idea is to use
valueRecordDef <-50 0 0 0> DOT_ADJUSTMENT;
pos behDotless-ar.init dotbelow-ar' <DOT_ADJUSTMENT> alef-ar.fina;
And if I can store the
valueRecordDef declaration somewhere per-master it might work, but I don’t see anywhere to do this.
You can use a “Replace Prefix” custom value on an instance. (It works in Glyphs, I don’t know if fontmake uses this custom value.)
1 – Add a prefix to your font and place the default value-record-def there:
2 – Use the value-record from the feature:
3 – Replace the prefix in the instance you want to differ:
Here is the test font from the screenshots above:
Test.glyphs (16.5 KB)
Thanks, I already found this. But it does not work for variable fonts, since it is only applied to static instances. Masters don’t support this custom parameter.
There is no workflow that allows manually defining variable GPOS. We are working on something. There is a meeting in the next few days/weeks about this. So as far as I can tell, there is no way to do that (except that tool from @SimonC )
If I can get the specific values to the masters, varLib should be able to take care of the rest as it can merge any GPOS data.
In Glyphs 3, you would use tokens. There, the values are defined on the masters and interpolate nicely. But fontmake does not work with that setup (yet).
And the tokens are not variable, yet.
Replace Prefix in masters seems to be taken into account, apparently glyphsLib does not really care if it is set on master or instance. So, I can get this to work with fontmake but it will not work in Glyphs, but this is good enough for my needs.
Because they export a .ttf for each master and then combine those. And if you can sneak in some different values, that will pick it up.