I’m currently working on an adaptation of Andy Climer’s kerntroller (some of you might have heard about it) for Glyphs. The point is that I am now breaking the challenge into small parts and I am currently trying to access the cursor via a script and try to change the glyph before the cursor (just an example) for the next glyph inside the font.
Here the code that I now have and that prints where is the cursor and which characters are on the left and on the right.
# Font font = Glyphs.font for tab in font.tabs: # Text in the tab tabText = tab.text #print(tabText) # Cursor cursor = tab.textCursor # Print statement print ("""Cursor at index %s. Letter '%s' is on the left and '%s' on the right.""" % (cursor, tabText[cursor-1], tabText[cursor])) # Clear macro window Glyphs.clearLog()
Anyone knows where can I get the information about this or how to do it?
Thank you so much!