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

Fix brace layer parsing to force int where there may be strings #783

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jpt
Copy link

@jpt jpt commented Apr 1, 2022

I was running into this error while converting a file that uses brace layers:

    brace_layers.sort(key=lambda x: tuple(x.location.values()))
TypeError: '<' not supported between instances of 'str' and 'int'

The issue was that my Glyphs file had some integers in its brace layer axis locations, along with some strings. I'm not sure how or why this divergence occurred, but I think it would make sense to force an int for these values.

@anthrotype
Copy link
Member

i'm not sure the fix is correct. Can you provide a reproducer?

@jpt
Copy link
Author

jpt commented May 4, 2022

I'll work on putting together a minimal file that can reproduce this, thanks for looking into it

@bramstein
Copy link
Contributor

For what it is worth: we also ran into this issue with one of our families. It seems the most recent (unreleased) Glyphs version 3.2 automatically fixes this upon saving.

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

Successfully merging this pull request may close these issues.

3 participants