Thanks to visit codestin.com
Credit goes to github.com

Skip to content

get_fontconfig_fonts() returning not a list but a concatenation of file names #8635

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

Closed
adlvdl opened this issue May 17, 2017 · 1 comment
Closed

Comments

@adlvdl
Copy link

adlvdl commented May 17, 2017

Bug report

Bug summary

The method get_fontconfig_fonts() in matplotlib.font_manager should return a list of files according to the documentation but in my machine it returns a list with one element that represents all paths concatenated. The snippet comes from a stack-overflow answer.

Code for reproduction

import matplotlib.font_manager
flist = matplotlib.font_manager.get_fontconfig_fonts()
names = [matplotlib.font_manager.FontProperties(fname=fname).get_name() for fname in flist]
print(names)

Actual outcome

OSError: [Errno 36] File name too long

Expected outcome

It should return a list of names

Matplotlib version

  • Operating System: Fedora 25
  • Matplotlib Version: 2.0.0
  • Python Version: 3.5
  • Jupyter Version (if applicable):
  • Other Libraries:

I think I used pip3 to install matplotlib but I'm not 100% sure.

@dstansby
Copy link
Member

See #7906 - this should be fixed in version 2.0.1.

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

2 participants