I have set up some contextual kerning that worked fine in a single axis design space. Then I have added a second axis, expressed through two ‘virtual masters’ and since then I cannot get the fonts to export anymore as the following error comes up:
I’ve tried to adjust the contextual kerning by adding coordinates of the second axis, but to no avail for now. Can someone tell me what I am doing wrong? Thank you!
The Variable Font Origin is only relevant for Variable Fonts (as the name says).
the variable kerning is not applied to static instances. Those can use number values tokens to simplify the setup. Improving that is on my list …
Thanks, that’s why I didn’t set it or assumed it could be the problem.
I am not sure I get the problem. I was trying to define contextual kerning, regardless whether the output are static or variable fonts. The error arises when exporting static fonts, at which point the variable origin should be irrelevant, no?
you need to out the variable feature code in a #ifdef VARIABLE … #endif block to hide it from the static instances. It would be nice if the variable code could be instantiated for static font, but we are not there, yet.
For clarification: this has nothing to do with variable fonts, it’s just interpolating kerning values defined in a separate contextual lookup.
The problem appears to be that I have defined four kerning values for the four masters of my weight axis at locations along this axis that are identical to the master positions. Once I define the kerning values on positions that are just off the master positions, everything works as expected. Why I cannot define the kerning values at the master positions is not clear to me.
My masters are situated on positions 2-300-600-1000 on the weight axis. The following kerning definition works:
Ok, but as I said, if I define the kerning value at the end of the axis – i.e. 1000 – I get the error.
I am following the Glyphs tutorial on contextual kerning, I don’t see what I am doing differently.
BTW, there seems to be an inconsistency in the text. It states first that the kerning values can be interpolated, only to then list amongst the drawbacks that ‘Since our lookup is feature code that gets injected into every instance at export time, the contextual kerning does not interpolate.’ Maybe a leftover from an older version?