-
-
Save weiweihuanghuang/e8d12e9cb9d58205f8758a6354753b3b to your computer and use it in GitHub Desktop.
removeExternalOverlaps.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#MenuTitle: Remove External Overlaps | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Removes external overlaps for selected Glyphs | |
""" | |
import GlyphsApp | |
from GlyphsApp import GSPathPen | |
ListOfSelectedGlyphs = [ l for l in Font.selectedLayers if hasattr(l.parent, 'name')] | |
for thisLayer in ListOfSelectedGlyphs: | |
layerPaths = [l for l in thisLayer.paths] | |
for l in thisLayer.paths: | |
del(l) | |
for eachPath in layerPaths: | |
pen = GSPathPen.alloc().init() | |
eachPath.drawInPen_(pen) | |
eachPath = pen.layer().paths | |
thisLayer.addPath_(eachPath[0]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment