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

Font file not found when using FontAwesome icons #4

Closed
mostlyoxygen opened this issue Jul 5, 2018 · 2 comments
Closed

Font file not found when using FontAwesome icons #4

mostlyoxygen opened this issue Jul 5, 2018 · 2 comments

Comments

@mostlyoxygen
Copy link

When creating a chart with icons a FileNotFoundError is thrown, whilst looking for the file font/FontAwesome.otf. This seems to be because it's trying to find the file relative to the location of the calling script, rather than in the font package created during installation.

A simple fix for this would be to modify waffle.py to import the font package and use its __path__ value to construct the path to the FontAwesome file:

import font
import os
FONTAWESOME_FILE = os.path.join(font.__path__[0], 'FontAwesome.otf')

If you're happy with this fix I can make a pull request.

@gyli
Copy link
Owner

gyli commented Jul 6, 2018

That's a good one. Fixed.

Thank you!

@mostlyoxygen
Copy link
Author

Thanks for fixing it so quickly.

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