Skip to content

Instantly share code, notes, and snippets.

@mekkablue
Created September 12, 2019 18:41
Show Gist options
  • Save mekkablue/fdd807ef8417307f2df580349d63cf1c to your computer and use it in GitHub Desktop.
Save mekkablue/fdd807ef8417307f2df580349d63cf1c to your computer and use it in GitHub Desktop.
Glyphs: merge paths from other master layers into current master (for selected glyphs)
m = Font.selectedFontMaster
for sl in Font.selectedLayers:
g = sl.parent
print "Processing %s:" % g.name,
targetLayer = g.layers[m.id]
pathcount = 0
for l in g.layers:
if l.isMasterLayer and l != targetLayer:
for p in l.paths:
targetLayer.paths.append(p.copy())
pathcount += 1
print " merged %i paths." % pathcount
@mekkablue
Copy link
Author

  1. Paste this in Macro Window
  2. Select target master (Cmd-1, 2, 3...)
  3. Select any number of glyphs
  4. Run Script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment