Theoretical question:
To my understanding, a variable font file is basically just a standard font file with some extra tables (fvar, gvar, etc.) that describe the design space, the deltas, etc.
Does this mean it's impossible to have different kerning information for different masters, given that kerning information is stored in a separate table with no copy-per-master mechanism?
Practical question:
I've got a variable TT file with no kerning information. I've also got a .fea file with a kern feature. I'd like to inject that kern feature into the TT file (with respect to the previous question, I'd like all masters to share the same kerning information). What would be the easiest and safest way to do that? makeotf? Decompile and recompile using ttx? If ttx, how do I safely add the feature to the decompiled file?
0
Comments
Yes, the positioning features for the default outline goes in GPOS, and the deltas are stored in an IVS. Putting these in by hand is in insane, and putting per-master layout features into a variable font is currently unpleasant in the open source toolchain - you need to generate individual fonts for the masters, add the positioning rules to each font (since the values will be different) and then merge them together into one font at the end, which computes the deltas and puts them into the IVS. This doesn't work well for any layout rules other than kerning and anchors, because in those cases the per-master values can be derived from the font source file; for more complex rules, you in theory would have to write a per-master feature file, but most font editors don't support doing that.
My idea is to allow the user to write a feature file in a way that supports variations. There is a draft specification for how to do this with an extension Adobe feature syntax; you can then use my fonttools branch to process variable feature files (with e.g. fonttools feaLib whatever.varfea whatever.ttf), adding the rules to the font binary directly.