Add Alternate Bracket Layers as duplicate Masters Layers

Hi there,

I try to find a way to scripting a similar script than Mekkablue > Insert Special Layers, but with a duplication of the two masters.
For now the Mekkablue’s Script adds 1 layer not valid with the new preset of special layers in glyphs3 and I can’t control where the layer is placed:
Capture d’écran 2021-03-02 à 16.20.54

What I would like to do:
Capture d’écran 2021-03-02 à 16.15.49

I have 2 upright Masters, Thin and ExtraBold
I want to combine there respective italics but with differents forms (nbr of nodes etc…) and be able to generate a variable-font

Thank you for your help!

Hi, +1 on that, I’m trying to do exactly the same thing than Adrien but can’t manage to find any info about how to create alternate layers and name them with scripts. But I know it should exists somewhere, still being undocumented yet (which I perfectly understand).

Any leads on that maybe @mekkablue ??

I just updated the docu: Python Scripting API Documentation — Python Scripting API 3.0 documentation

1 Like

Thanks a lot, that did exactly the trick!

Then it looks like that in my script:

newLayerOrigin.attributes['axisRules'] = {targetAxisId: {'max':ruleMax, 'min': ruleMin}}

Thank you!!