Skip to content

Instantly share code, notes, and snippets.

@axani
Last active December 29, 2015 07:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save axani/7639366 to your computer and use it in GitHub Desktop.
Save axani/7639366 to your computer and use it in GitHub Desktop.
Bulk change spacing of all glyphs in RoboFont
class ChangeMetrics:
def __init__(self):
for currentGlyph in CurrentFont():
left_space = currentGlyph.leftMargin
right_space = currentGlyph.rightMargin
# Define the value by which you want to change the metrics.
change_units_by = 5
currentGlyph.leftMargin += change_units_by
currentGlyph.rightMargin += change_units_by
print "Spacing successfully changed unit of %s by %s" % (currentGlyph.name, change_units_by)
ChangeMetrics()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment