Move to next glyph (in preview string) via shortcut?


#1

Is there a command to move to (activate for editing) the next glyph in the tab? It would be handy when I open some glyphs in a tab and then want to step through them. In other words: the same as double-clicking on the glyph next to the current one.

Or, could it be done via script?

Note: I don’t mean switching the current glyph to the next glyph as per font tab, as View > Show Next Glyph does.


#2

Currently it is ‘T’ (to switch to text mode) arrow right and ‘esc’ to switch back to edit mode.
But you can write an shortcut. Should be a one liner. I’m not at the Mac but it has to do with ‘editview.selectionRange()’.


#3
Font.currentTab.textCursor += 1

#4

Cool, thanks Rainer!


#5

Just added Edit Next Glyph and Edit Previous Glyph to my GitHub in case someone wants to use them:

Naturally, the scripts make most sense when given a keyboard shortcut in the system preferences.


#6

Nice! I added a pull request for cycling to the beginning or end when the last or first glyph is reached with these scripts. See for yourself.


#7

This is just what I was looking for; thanks @TimAhrens!

One thing I realized as soon as I used this, though … I really wish the viewport would shift the newly-selected glyph into the center of view.

@GeorgSeifert how might I make the view shift, to keep up with my work?


#8

Panning-as-necessary is exactly what it should do, I added it last year:

Seems like this is broken right now. @GeorgSeifert : has something changed in the API?


#9

I did change the API indeed and missed some of it in the wrapper. Thanks for pointing this out. I fixed it. But the entering is not working correctly. It only shifts the view left, but if you jump to the next line, it doesn’t centre and when the next line is below, it doesn’t move the view up.


#10

Nice, thanks to both of you!

So @GeorgSeifert, I guess the Y movement is something Tim or I could fix with the next GlyphsApp update?


#11

this will be fixed in v1201.