With the doRules flag, makeInstance() will process the rules as glyph swaps in the UFO output.
The swaps are determined by fontTools.designspaceLib processRules. The swaps are handled by the same code that did this in the old UFOProcessor. This is not guaranteed to have the same outcomes as executing the same rules in a variable font. Because the features might mix things up more.
But this functionality was useful all by itself, so here it is.
For the theoretical use case in which a makeInstance is called with an anisotropic location, makeInstance will use the horizontal component of the location to process the rules.
Changes are available in https://github.com/LettError/ufoProcessor/tree/add_rules_options
I defined two new instances in the MutatorSans designspace, explicitly for testing the processing of rules. Update that if you want: https://github.com/LettError/mutatorSans
With the doRules flag, makeInstance() will process the rules as glyph swaps in the UFO output.
The swaps are determined by fontTools.designspaceLib processRules. The swaps are handled by the same code that did this in the old UFOProcessor. This is not guaranteed to have the same outcomes as executing the same rules in a variable font. Because the features might mix things up more.
But this functionality was useful all by itself, so here it is.
For the theoretical use case in which a makeInstance is called with an anisotropic location, makeInstance will use the horizontal component of the location to process the rules.
Changes are available in https://github.com/LettError/ufoProcessor/tree/add_rules_options
I defined two new instances in the MutatorSans designspace, explicitly for testing the processing of rules. Update that if you want: https://github.com/LettError/mutatorSans