[Scripting] Create multiple CP with same name

I would like to generate multiple “Style Name as STAT entry” CP without overwriting the previous one, it’s possible ?

I’m using this code.

for axeTag in fontAxes:
	instance.customParameters['Style Name as STAT entry'] = axeTag

I found a solution (probably not the best, but viable)
I add a number at the end of the CP name when I generate them, and after I remove in each CP name generated the last char.

It works like this:

cp = GSCustomParameter("name", "value")
instance.customParameters.append(cp)

Just that for ‘Style Name as STAT entry’, only the first one would be used.

1 Like

Thanks Georg,

I’m learning how STAT works.

So if multiple “Style Name as STAT entry” CP are set, only the first one will be used and all others will be erased ? That’s right ?

In the following example:

For the instance (Regular Weight/Regular Width) which STAT CP need to be set ?

Actually I have something set like this