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

Failed to load any font ? #266

Closed
cournape opened this issue Feb 6, 2017 · 6 comments
Closed

Failed to load any font ? #266

cournape opened this issue Feb 6, 2017 · 6 comments

Comments

@cournape
Copy link
Contributor

cournape commented Feb 6, 2017

The following w/ enable 4.6.0 on a basic centos 6.5 system:

$ edm run -e build-env -- python -c "from kiva.fonttools import afm"                                                                                                                                              
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/vagrant/.edm-build/envs/build-env/lib/python2.7/site-packages/kiva/__init__.py", line 21, in <module>
    from .fonttools import Font
  File "/home/vagrant/.edm-build/envs/build-env/lib/python2.7/site-packages/kiva/fonttools/__init__.py", line 1, in <module>
    from .font import Font, str_to_font
  File "/home/vagrant/.edm-build/envs/build-env/lib/python2.7/site-packages/kiva/fonttools/font.py", line 11, in <module>
    from .font_manager import FontProperties, fontManager
  File "/home/vagrant/.edm-build/envs/build-env/lib/python2.7/site-packages/kiva/fonttools/font_manager.py", line 1418, in <module>
    _rebuild()
  File "/home/vagrant/.edm-build/envs/build-env/lib/python2.7/site-packages/kiva/fonttools/font_manager.py", line 1367, in _rebuild
    fontManager = FontManager()
  File "/home/vagrant/.edm-build/envs/build-env/lib/python2.7/site-packages/kiva/fonttools/font_manager.py", line 1078, in __init__
    self.defaultFont['ttf'] = self.ttffiles[0]
IndexError: list index out of range
@corranwebster
Copy link
Contributor

Even if there are no fonts installed on the system, we should fail more gracefully than this. In particular, if we can do it on use, rather than import, that would be better.

@corranwebster
Copy link
Contributor

Also, this may be moot with #264, since that replaces all the fonttools stuff with a third-party package.

@cournape
Copy link
Contributor Author

cournape commented Feb 6, 2017

I tried enable master, and got exactly the same error FWIW.

@andrewcollette
Copy link
Contributor

FWIW, with enable 4.5.1 it prints the following lines and then proceeds normally, and creates a "kiva/fontList.cache" file in the preferences dir of my Canopy Data app. On the next launch, the lines aren't printed and the app launches normally. This is all using EDM on OS X. With enable 4.6.0 I get the error described in this issue.

Fontconfig error: Cannot load default config file
Fontconfig error: Cannot load default config file

@mdickinson
Copy link
Member

Adding the BUG label, since this seems to be a regression since the previous release of Enable.

@mdickinson
Copy link
Member

This was fixed in master #272.

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

No branches or pull requests

4 participants