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: Paste in View Center | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Pastes components and paths in clipboard into the center of the Edit view. | |
""" | |
import math | |
def transform(shiftX=0.0, shiftY=0.0, rotate=0.0, skew=0.0, scale=1.0): | |
myTransform = NSAffineTransform.transform() |
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: SVN Update | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Issues an SVN Update command on specified folders and reports to the Macro Window. | |
""" | |
import vanilla, subprocess | |
class SVNUpdate( object ): | |
def __init__( self ): |
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: Save Selected Glyphs as PNG | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Saves selected glyphs as PNGs. Uses ascender and descender for top and bottom edges of the images. | |
""" | |
from AppKit import NSCalibratedRGBColorSpace, NSPNGFileType | |
def transform(shiftX=0.0, shiftY=0.0, rotate=0.0, scale=1.0): | |
""" |
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: Fix Stuck Macro Window | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
If you cannot resize your Macro window anymore, run this script. | |
""" | |
import os | |
terminalCommand = 'defaults delete com.GeorgSeifert.Glyphs2 "NSWindow Frame MacroPanel"' | |
os.system( terminalCommand ) |
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: Insert #exit and #entry at Baseline | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Adds #exit and #entry anchors at the sidebearings on the baseline. Useful for glyphs like period that are reused in glyphs like ellipsis. | |
""" | |
def process( thisLayer ): | |
for thisAnchorInfo in (("#entry",0),("#exit",1),): | |
newAnchor = GSAnchor() | |
newAnchor.name = thisAnchorInfo[0] |
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: Select Same Color | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
In Font view, select glyphs with the same color(s) as the currently selected one(s). | |
""" | |
from AppKit import NSIndexSet | |
def indexSetWithIndex( index ): | |
indexSet = NSIndexSet.alloc().initWithIndex_( index ) |
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: Select following on-curve point | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
From the currently selected point, go to the next on-curve. | |
""" | |
def getTheFirstPoint(selection): | |
for thisItem in selection: | |
if type(thisItem) == GSNode: | |
return thisItem |
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: Make c2sc from smcp | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Makes component based c2sc glyphs, using the smcp glyphs as components. | |
Ignores selected glyphs without an .smcp ending. | |
""" | |
Font = Glyphs.font |
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: Copy kerning classes from smcp to c2sc | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Goes through all selected .c2sc glyphs that have no kerning classes, | |
checks if there is a corresponding .smcp glyph, | |
and if so, copies the .smcp kerning classes to the .c2sc glyph. | |
""" | |
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: Export Kerning Info CSV | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Export a CSV containing kerning info. | |
""" | |
import commands | |
from types import * |