Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error thrown if next master doesn't contain current glyph #8

Open
ryanbugden opened this issue Jan 28, 2020 · 5 comments
Open

Error thrown if next master doesn't contain current glyph #8

ryanbugden opened this issue Jan 28, 2020 · 5 comments

Comments

@ryanbugden
Copy link
Contributor

Getting the following traceback sometimes, line 279, in switch

Traceback (most recent call last):
  File "editThatPreviousMaster.py", line 318, in <module>
  File "editThatPreviousMaster.py", line 279, in switch
  File "lib/fontObjects/fontPartsWrappers.pyc", line 1637, in __getitem__
KeyError: "No glyph named 'bracketright'."

Could the behavior be such that it would go to the next master anyway, but go to a glyph that it has? Or no active glyph? Something like but probably not this?

try:
    nextGlyph = nextMaster[g.name]
except KeyError:
    nextGlyph = nextMaster["space"] # or something all fonts would have? I don't know the best solution.
@frankrolf
Copy link
Contributor

Going to a basic glyph that all masters have would lead to frustration (for me).
There used to be an option for creating a new glyph, but that has also been dropped to minimize workflow disruption.
I’d rather have the master skipped if a glyph doesn’t exist.

FWIW, I don’t get a traceback, but hit a dead end when I try going to the next master – I can go backward again, but no longer forward (using ETNM 1.2.4 on RF 3.5b (build 2007102200). I’d be curious to see what happens if two masters don’t contain the glyph.

In my minimal window toggling script, I do this to skip over master w/o the current glyph:
https://gist.github.com/frankrolf/20493e72adfef446032dcfedcef56e8e#file-toggle-py-L89-L100

@LettError
Copy link
Owner

In that case, if you’re in a glyph that is not present in any of the other masters, where do you go?

@frankrolf
Copy link
Contributor

If you have various UFOs open, and A only exists in the current UFO, you stay in the current UFO.
A.K.A. “nothing happens”

@ryanbugden
Copy link
Contributor Author

I personally prefer going to the next master no matter what. I think staying on the same glyph is a strong core feature of the extension, but to me it's not necessarily "Edit (this, or nothing, in) Next Master". Even if the next master doesn't have an A, I probably thought it would have, or subconsciously expected it to when I hit the keyboard shortcut. I've now navigated to that master and am closer to being able to either add the A or work on some other glyph in that master. In my humble, scrappy opinion.

Maybe it's a behavior preference?

  • Create the glyph
  • Go to a common glyph
  • Skip the master/do nothing

@frankrolf
Copy link
Contributor

One thing to keep in mind – the glyph window is not the only way to toggle masters. There also is a font overview, which probably is better suited to consciously create new glyphs (I honestly don’t know how how I usually create new glyphs – with the previous/next buttons perhaps?)

Maybe this is not so much a problem in default mode, more of a problem of the Single Window mode (which I know you’re a user of)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants