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: Get All Components | |
# -*- coding: utf-8 -*- | |
"""Returns the selected text with all components available in each glyph""" | |
from AppKit import NSRange | |
Font = Glyphs.font | |
Doc = Glyphs.currentDocument | |
# Replace selected text |
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: Activate Default Features | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Activate these default features | |
""" | |
import GlyphsApp | |
Font = Glyphs.font | |
editTab = Font.currentTab |
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
Font = Glyphs.font | |
Doc = Glyphs.currentDocument | |
Glyphs.clearLog() | |
currentGraphicView = Glyphs.currentDocument.windowController().activeEditViewController().graphicView() | |
thisActivePosition = currentGraphicView.activePosition() | |
thisVisibleRect = currentGraphicView.visibleRect() | |
thisScale = currentGraphicView.scale() |
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: Show master | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Show the amster in preview field or preview window. | |
""" | |
import GlyphsApp | |
from Foundation import NSApplication | |
numberOfInstances = len( Glyphs.font.instances ) |
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: Set Transform Origin to Centre of Selection | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Sets origin point for Rotate tool to the centre of the selection. | |
""" | |
import GlyphsApp | |
Font = Glyphs.font | |
Doc = Glyphs.currentDocument | |
selectedLayer = Font.selectedLayers[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
from robofab.interface.all.dialogs import SelectFont | |
from robofab.pens.digestPen import DigestPointPen | |
# f1 = SelectFont("Select 'Master' font:") | |
# f2 = SelectFont("Select font to compare:") | |
fonts = AllFonts() | |
f1 = fonts[0] | |
f2 = fonts[1] |
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: Show Glyphs with this Anchor | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
New Tab with all Glyphs that have the selected anchor. | |
""" | |
thisFont = Glyphs.font # frontmost font | |
selectedLayer = thisFont.selectedLayers[0] | |
selection = selectedLayer.selection |
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: Show Glyphs with this Anchor | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
New Tab with all Glyphs that are have the selected anchor. | |
""" | |
thisFont = Glyphs.font # frontmost font | |
selectedLayer = thisFont.selectedLayers[0] | |
selection = selectedLayer.selection |
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: Delete Kerning Pairs Smaller Than # | |
# -*- coding: utf-8 -*- | |
__doc__=""" | |
Delete all kerning pairs equal to or smaller than # in selected master | |
""" | |
import vanilla | |
import GlyphsApp | |
class deleteKerning( object ): |
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: Uppercase | |
# -*- coding: utf-8 -*- | |
"""Converts the selected text to upppercase.""" | |
Doc = Glyphs.currentDocument | |
Font = Glyphs.font | |
Doc = Glyphs.currentDocument | |
TextStoreage = Doc.windowController().activeEditViewController().graphicView().textStorage() | |
String = TextStoreage.text().string() | |
Range = TextStoreage.selectedRange() |
NewerOlder