How do I do this? I can get the string but not the glyph name…
Font = Glyphs.font
Doc = Glyphs.currentDocument
TextStoreage = Doc.windowController().activeEditViewController().graphicView().textStorage()
String = TextStoreage.text().string()
Range = Doc.windowController().activeEditViewController().graphicView().selectedRange()
if Range.length == 0:
Range.location = Range.location - 1
Range.length = 2
string = String.substringWithRange_(Range)
I’m trying to create a script that adds kerning for the currently selected glyph and the previous, but can’t get the previous glyph’s name.