Bypass Filter in Custom Parameter

Is it possible to bypass a filter to be called in the Instances of Font Info? I got a plugin which is quite intense on the CPU. It’s not a problem when run on otf export. But it makes Glyphs super laggy when you click through the instances, because it tries to apply the filter to the instance preview.

The Filter seems to run already on each first launch of the Font Info. It would be nice to avoid this here as well.

Also: Is there a way to find out how I could use interpolatedFontProxy? I could really need this for single glyphs. I read the documentation, but I don’t know where to start. I know ObjectiveC, but there is still a missing link.

It is so slow that a few glyphs take a while? Then you might need to profile the code to see if you can seed it up a bit :wink:

I don’t see an option to skip the filter for the preview.

What do you like to do with the interpolatedFontProxy? It should behave similar to a GSFont object. You don’t need Objectiv-C for it.

Yes, it is slow, because it runs .interpolatedFont for all instances first. It needs to do this to access the width values of all instance glyphs (which are not laying on the masters).

I run this interpolatedFont in the start method of my filter, and it calculates for all instances, because I pass the CustomParameter values in that method already.

This is what made me think, that the interpolatedFontProxy with only one glyph per time could be faster when I just run it in the actual Filter method?! In the documentation it’s written, that it is not implemented in the wrapper and one will need to use ObjectiveC.

My final goal is: get the width of a glyph (layer) from a certain instance which is not the currently processed one. Now after messing around more with the interpolatedFontProxy I think I might getting there …

Edit Yes, as I expected: interpolatedFontProxy did help a lot. It’s now blazing fast. BUT the Instance Preview doesn’t show the result. The Exported Fonts do, though.