Python script as custom parameter?

Is there an easy way to run a Python script as custom parameter for a particular instance? Seems like only filters can be used? I thought about creating a Python-based filter for this but it seems unnecessarily complicated and it means I’d first have to figure out how to create one. Any ideas?

What exactly do you want to do?

The LayerGeek filter can call any GSLayer function: https://github.com/mekkablue/LayerGeek

I was thinking of something like this. In my case I wanted to apply a graphical filter, so LayerGeek might do what I want.

Or, simply make a filter specific to your project. Takes 10 minutes, or 3, if you already have some code ready.

Wow, LayerGeek is very cool. I will keep that in mind for future projects. Right now, it does not seem to do the trick for me, though. Essentially, I am hard-activating a number of stylistic sets. This means that many glyphs referenced in the feature code are not existing any more. Removing the respective ssxx features is easy but there are other features like calt that need the missing glyphs to be removed.

So, I thought of doing this via Python.

Or, is it easier to remove all features and then manually include a .fea file for this instance?

Do you know any trick to solve this?

Btw, I just noticed that the Remove Features parameter has absolutely no effect for me. How is it supposed to work? I entered a comma-separated list as per manual.

You should get a drop down text field, where you enter one feature name per line.

If the ssXX features are auto-generated, you need not worry, as they get recalculated at export.

Manually written features like calt are indeed tricky. Can you reduce it to changes in OT classes? Perhaps send me an e-mail with the feature and a brief as to what is supposed to change in the font. I’ll see if there is a way to do this with a plugin/custom parameter.