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
(fix #2097) PGF: get fonts from fc-list, use builtin fonts for tests #2829
Conversation
Who are the correct people to ping to get this tested on macs? |
There are also a number of pep8 violations in this PR (mostly looks like missing spaces after trailing ' |
Fixed pep8 violations and rebased PR on current master. |
I had another look around and found a few discussions about So, still looking for other options. What about calling native routines?
Can we rely on that? |
Stepping back, at the end of the day I think what you want is to know what fonts are available to |
@mdboom Exactly, but sadly I didn't find anything useful when I looked into that. There seems to be no way of getting a font-list from
So, back to question. I guess we should use the |
I think that as this stands, the fonts that matplotlib includes will be no longer included in the font list by default, which is not great, given that many users who install from source expect to have access to the STIX and Bakoma fonts etc. An alternative here might be to add an additional font cache file based on |
I think this patch is safe to merge, at least for windows and linux it should provide the improvement of not including the matplotlib-shipped fonts, which are unknown to latex. @mdboom please note that this PR only affects the font-lookup within backend_pgf, not the generic matplotlib getSystemFonts function. Furthermore, the pgf unit tests do not depend on system fonts any more and rely on the defaults from the installed latex distribution. Still no clue what will happen to OSX users since we never got any input concerning the presence of fontconfig or the python cocoa bindings. |
@pwuertz: Thanks for jogging my memory. If this only affects the PGF backend, then I agree this is fine. |
(fix #2097) PGF: get fonts from fc-list, use builtin fonts for tests
Attempt to fix #2097 where
font_manager.findSystemFonts()
includes matplotlib bundled non-system fonts which are unavailable to latex. Instead, rely on the fonctonfigfc-list
tool which is assumed to be present on Linux and OSX systems.While this is probably safe for Linux, we still have to find out if this is a safe assumption for OSX.