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

Skip to content

font_manager.get_fontconfig_fonts() reports a single item of all fonts concatenated #7906

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
sandrotosi opened this issue Jan 21, 2017 · 1 comment
Milestone

Comments

@sandrotosi
Copy link
Contributor

as reported on Debian as http://bugs.debian.org/852060:

While using matplotlib to list installed files in a python3 script:
font_manager.get_fontconfig_fonts(),
the list I get has only one element, that contains all fonts names concatenated.

I've tried replacing
out = subprocess.check_output([str('fc-list'), '--format=%{file}'])
on line 284 by:
out = subprocess.check_output([str('fc-list'), '--format=%{file}\\n'])
and that works.

I can confirm this happens on both py2 and py3

do you think that's the right approach or is there a better way to fix this issue? thanks!

@jkseppan
Copy link
Member

Yes, I think including the newline in the format string is correct. It seems that we used to do that but accidentally lost the newline in #7596.

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