This file contains hidden or 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 | |
Glyphs.clearLog() | |
currentGraphicView = Font.currentTab.graphicView() | |
#thisActivePosition = currentGraphicView.activePosition() # This could be used to just the visibleRect | |
thisVisibleRect = currentGraphicView.visibleRect() | |
thisScale = currentGraphicView.scale() | |
for eachTab in Font.tabs: |
This file contains hidden or 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: Clipboard | |
# -*- coding: utf-8 -*- | |
from Foundation import * | |
pasteboard = NSPasteboard.generalPasteboard() | |
typeName = pasteboard.availableTypeFromArray_(["Glyphs elements pasteboard type"]) | |
if typeName == "Glyphs elements pasteboard type": | |
Layer = Glyphs.font.selectedLayers[0] | |
if Layer: |
This file contains hidden or 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 | |
selectedLayer = Font.selectedLayers[0] |
This file contains hidden or 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 hidden or 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() |