Best way to duplicate masters and set _corner from 0% to 100% globally?

Hello,

I have 9 non-rounded masters. I’ve already added _corner parameters to every glyph, currently set to 0% (so no rounding is visible).
Now I want to duplicate these 9 masters to create a rounded version, with all _corner values set to 100%.

Two questions:

  1. Is duplicating the masters the best way to do this?

  2. How can I change the _corner value from 0% to 100% across all selected glyphs at once, instead of having to open each glyph and change it manually?

Thanks in advance!

I wouldn’t duplicate the masters, if all you’re doing is changing the corner component scale to 0.

Is your goal to make this a variable rounding axis?

In any case, if you really are only duplicating the masters and nothing else, then use a script on export.

You can simply set the scale of all corner components (technically, they’re GSHint objects) to 0 for all concerned layers with a script.

If you can give some more detail on what exactly you’re trying to achieve, maybe there’s a better idea.

Thanks for the clarification.

Yes, my project is a variable font with two axes: Width and Rounded.
That’s why I thought the best approach was to have a regular version (_corner at 0%) and a rounded version (_corner at 100%) as separate masters, so they can interpolate.

The reason I want to duplicate the masters is that some glyphs will need manual adjustments to the _corner percentage — because setting it to 100% might look bad in certain shapes.
So my plan was to create the rounded masters as a base, and then go glyph by glyph to fine‑tune the rounding where needed.

Given that, do you still recommend using a script instead of duplicating masters?
And which script are you referring to?

Thanks again!

If it needs to be variable, you need to two sets of masters. The question is, what is the most effective way to set it up. I’ll think about it a bit.

Thanks for the answers. I got it working. Finally, I did this:

  1. Duplicated the 9 normal masters → renamed to “rounded”

  2. Set Roundness = 100 on all rounded masters

  3. Ran this script to automatically scale all _corner. components to 100%:

python

from GlyphsApp import *

font = Glyphs.font
target_masters = [m for m in font.masters if "rounded" in m.name.lower()]

for master in target_masters:
    for glyph in font.glyphs:
        for layer in glyph.layers:
            if layer.master == master:
                for hint in layer.hints:
                    if hasattr(hint, 'name') and hint.name and hint.name.startswith('_corner'):
                        hint.scale = (1.0, 1.0)

print("Done!")

Now I have 9 regular masters (Roundness=0) + 9 rounded masters (Roundness=100). The variable font interpolates smoothly between them.

You’re doing some unnecessary iterations. You can simplify:

targetMasterIds = [master.id for master in # ...]
for glyph in Font.glyphs:  # simply use the Font alias
    for layer in glyph.layers:
        if layer.associatedMasterId in targetMasterIds:
            # ...

Depending on the amount of rounding, you might do the opposite. Draw the rounded font and then make the sharp masters per script. That way you can find tune the radiuses. That might be needed in extreme masters or when the radius is close to half the stem thickness.