Insert feature at index with a script

Hello there,

According to the Python Documentation, it is possible to append a feature to the end of the feature file through scripting. It is also possible to get the index of a specific feature within the feature file.

Is there a possibility to insert a feature at a specific index too?

Thanks in advance,

Try GSFont.insertObject_inFeaturesAtIndex_(myFeature, index)

1 Like

In this case “myFeature” would be the prefix, the feature code, or a combination of both?

A GSFeature, see the details on

1 Like

Thanks for the quick reply, it works now.