| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
This works for me.
Sorry, something went wrong.
Current coverage is 62.17% (diff: 100%)@@ master #7907 diff @@
==========================================
Files 174 174
Lines 56121 56121
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 34896 34894 -2
- Misses 21225 21227 +2
Partials 0 0
|
Sorry, something went wrong.
|
Does this mean our font finding is broken in 2.0? |
Sorry, something went wrong.
|
Sorry, something went wrong.
|
It's not widely reported because of the setting USE_FONTCONFIG = False in font_manager.py so we don't really use fontconfig. In #7906 someone is using the functions directly. |
Sorry, something went wrong.
|
What are (or would be) the reasons to use it or not to use it? |
Sorry, something went wrong.
|
The fontconfig stuff is experimental code from ca. 2007 and is behind a
flag to allow experimentation by interested parties. Probably it was
felt to be risky for some reason - perhaps there are reports in the
mailing list archives? Fontconfig is probably better at finding the
system fonts on Linux systems than our custom code. @mdboom had some
bigger font-related plans (MEP14) and I don't know if they conflict with
fontconfig.
|
Sorry, something went wrong.
|
Sorry, something went wrong.
|
I think that USE_FONTCONFIG setting works the opposite way. Setting it to True will use fc-match to find fonts, whereas setting it False (or on Windows) will use FontManager and trigger the fc-list call modified herein. The default is False. Has the Travis cache been working too well, and we've just been reloading the correct font list all this time? If we need to trigger a cache rebuild, we should probably bump FontManager.__version__ at this point as well. |
Sorry, something went wrong.
|
OK, I think I have an idea; in findSystemFonts, we also do a recursive search through some default directories. The line right after that discards any non-existent files (meaning the fc-list result is discarded.) So we're essentially looking for fonts twice, once via fc-list and once in some default directory. Apparently, no-one puts fonts elsewhere. |
Sorry, something went wrong.
|
I agree with @QuLogic 's analysis of what is gonig on and why this still appears to work. This should still be backported to 2.0.x (even if it is not as critical as it first appears). |
Sorry, something went wrong.
BUG: Add a newline separator in fc-list call Conflicts: lib/matplotlib/tests/test_font_manager.py - only backport the fix not the test as it uses a decorator that does not exist in 2.0.x
|
The backport is annoying because skipif is not defined on 2.0.x. I'll deal with this tomorrow. |
Sorry, something went wrong.
|
@QuLogic Regardless of why this was not an issue, one of the builds of the matrix could start with a removal of ~/.config/matplotlib/fontList.* so that font-finding is tested at least once. |
Sorry, something went wrong.
|
I think several of the jobs do have the setting DELETE_FONT_CACHE=1
which is supposed to do that.
|
Sorry, something went wrong.
|
Indeed, my bad. |
Sorry, something went wrong.
|
I wouldn't worry about backporting the skipif, just make the test do
`assert sys.platform=='win32' or len(...)>1`.
|
Sorry, something went wrong.
|
Backported to v2.0.x as fe1641b. |
Sorry, something went wrong.
BUG: Add a newline separator in fc-list call
Due to matplotlib#7907, the font cache is outdated and should be re-created.
| Back | FazBrowse Home | New Git URL |
Fixes #7906.