Skip to content

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

@ryanbugden

Description

@ryanbugden

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions