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:
Is duplicating the masters the best way to do this?
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?
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 for the answers. I got it working. Finally, I did this:
Duplicated the 9 normal masters → renamed to “rounded”
Set Roundness = 100 on all rounded masters
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.