I am writing a glyphsFilter that is meant to be run as mostly as a custom parameter. It does not treat the glyphs but only makes font-wide changes (to the kerning). How can I have the code executed only once? The method filter() is called for each glyph, and it is not trivial to detect in the method whether it has been called before (so that it could return immediately).
In this case you need to dig a bit deeper in the plugin implementation. The
filter() method is implemented in the
plugin.py file. If you overwrite the method:
def processFont_withArguments_(self, Font, Arguments): you have move control.
Thanks! That was quite easy, actually.