LettError/MutatorMath

Why are features removed exactly?

Closed this issue · 4 comments

In my experiments I found that features.fea file is removed from generated instances. I looked into the DesignSpace Format and could not find anything about it, so I suspect this is expected behaviour. Would it be too difficult to interpolate the numerical values in the features and include the interpolated feature file in instances if I made sure the structure is same in all the masters?

The reason for doing this would be maintaining subtable breaks in the kern feature. When re-generating the kern feature they either disappear or move to other places which is a problem in my case.

Adobe script interpolates fea: https://github.com/adobe-type-tools/python-scripts/blob/master/FDK%20Extras/UFOInstanceGenerator.py

Edit: oh I see this is the robofab script and not the mutatormath one, my bad.

Thank you Adrien, but that would not help unfortunately as the mark/kern features are generated from the kerning.plist in the UFO which does not include the subtable breaks. It becomes a problem when you have a lot of pairs.

btw. The Adobe guys pointed me towards the other scripts in that folder which use the same module to generate the mark/kern features as the mentioned script you use, but they are easy to use along MMath and makeInstancesUFO. The problem is that these cannot deal with the kerning I have, either. They can add subtable breaks, but not effectively (the kerning table overflows). I shall post an issue there.

Another typical case for feature code interpolation would be when you implement case-sensitive punctuation via GPOS and because of shifting x-height between different masters you need different positions for the shifting in each master. You would want these positions interpolated for each instance. Of course, I know how to work around that. Just saying it would be lovely to have that.

Hi David, it is not a trivial task to interpolate .fea text.

  • First it would need a some sort of object representation of all the data in the text, which in itself is difficult as it can only represent numerical data that relates directly to geometry. What to do with the rest what to do when masters have different values for non-interpolating fields?
  • Then suppose that all somehow works, instances can have more kerning pairs than each of the masters. So the stored position of the subtable breaks would be meaningless.

I don't see a practical way of building this.

If you have really neat kerning lined up for each master (and perhaps even as a separate imports in the .fea) you could extract the numbers and use raw Mutator objects to calculate your values.

Hi Erik, I guess I wished too much for this to work. Thanks! At the moment we found different way around, but I will keep it in my mind (particularly the case feature would be nice to interpolate).