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

Hangs indefinitely when uploading 2 local fonts #15

Closed
madig opened this issue Apr 4, 2018 · 4 comments
Closed

Hangs indefinitely when uploading 2 local fonts #15

madig opened this issue Apr 4, 2018 · 4 comments

Comments

@madig
Copy link
Contributor

madig commented Apr 4, 2018

"Comparing two sets of local fonts" on http://45.55.138.144/, dragging in two fonts and clicking upload makes the site hang...

@m4rc1e
Copy link
Collaborator

m4rc1e commented Apr 4, 2018

@madig mind emailing me the fonts?

@m4rc1e
Copy link
Collaborator

m4rc1e commented Apr 4, 2018

@madig thanks!

We've been using it on much smaller sets of fonts. I'll see what's happening.

@m4rc1e
Copy link
Collaborator

m4rc1e commented Apr 4, 2018

Alright found the issue with Dejavu

fonts_after = models.add_fonts(after, 'after', uuid)
  File "/Users/marc/Documents/gfregression/app/models.py", line 39, in add_fonts
    fonts.append(add_font(path, font_type, uuid))
  File "/Users/marc/Documents/gfregression/app/models.py", line 47, in add_font
    family_name, style = filename[:-4].split('-')

The filename didn't follow the pattern I was expecting which is FamilyName-StyleName.ttf. For Dejavu, the filename is DejaVuSans.ttf.

At GF, font filenames must mention the style. For everyone else this isn't a deal breaker so I'll modify this now.

In the meantime, if you're curious to have a look around, rename your font to DejaVuSans-Regular.ttf

I will also include better error handling so when tracebacks occur, you'll see errors on a dedicated page.

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

2 participants