File tree 1 file changed +25
-0
lines changed
1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ #MenuTitle: Decompose Corners and Caps & clean up
2
+ # -*- coding: utf-8 -*-
3
+ __doc__ = """
4
+ An slightly expanded @mekkablue script that:
5
+ Decomposes all corner and cap components in selected glyphs. Reports to Macro Window.
6
+ """
7
+
8
+ thisFont = Glyphs .font
9
+ selectedLayers = thisFont .selectedLayers
10
+
11
+ def process ( thisLayer ):
12
+ count = len ([h for h in Layer .hints if h .type in (CORNER ,CAP ) ])
13
+ if count :
14
+ thisLayer .decomposeCorners ()
15
+ thisLayer .cleanUpPaths ()
16
+ thisLayer .correctPathDirection ()
17
+ print "-- Decomposed %i caps and/or corners" % count
18
+
19
+ Glyphs .clearLog ()
20
+ for thisLayer in selectedLayers :
21
+ thisGlyph = thisLayer .parent
22
+ print "Processing" , thisGlyph .name
23
+ thisGlyph .beginUndo ()
24
+ process ( thisLayer )
25
+ thisGlyph .endUndo ()
You can’t perform that action at this time.
0 commit comments