I've tested this branch on MacOS 10.7 with freetype 2.4.9 (14.1.8), and all tests pass except three (the font_styles ones):
======================================================================
FAIL: matplotlib.tests.test_text.test_font_styles.test
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/Shared/Jenkins/Home/virtualenvs.nose.pil/python2.7-numpy1.6.1/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/Users/Shared/Jenkins/Home/virtualenvs.nose.pil/python2.7-numpy1.6.1/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 35, in failer
result = f(*args, **kwargs)
File "/Users/Shared/Jenkins/Home/virtualenvs.nose.pil/python2.7-numpy1.6.1/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 126, in do_test
'(RMS %(rms).3f)'%err)
ImageComparisonFailure: images not close: /Users/Shared/Jenkins/Home/jobs/matplotlib-mdboom-tests-osx-10.7-multiconfig/workspace/NV/1.6.1/PV/2.7/result_images/test_text/font_styles.png vs. /Users/Shared/Jenkins/Home/jobs/matplotlib-mdboom-tests-osx-10.7-multiconfig/workspace/NV/1.6.1/PV/2.7/result_images/test_text/expected-font_styles.png (RMS 47.138)
======================================================================
FAIL: matplotlib.tests.test_text.test_font_styles.test
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/Shared/Jenkins/Home/virtualenvs.nose.pil/python2.7-numpy1.6.1/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/Users/Shared/Jenkins/Home/virtualenvs.nose.pil/python2.7-numpy1.6.1/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 35, in failer
result = f(*args, **kwargs)
File "/Users/Shared/Jenkins/Home/virtualenvs.nose.pil/python2.7-numpy1.6.1/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 126, in do_test
'(RMS %(rms).3f)'%err)
ImageComparisonFailure: images not close: /Users/Shared/Jenkins/Home/jobs/matplotlib-mdboom-tests-osx-10.7-multiconfig/workspace/NV/1.6.1/PV/2.7/result_images/test_text/font_styles_pdf.png vs. /Users/Shared/Jenkins/Home/jobs/matplotlib-mdboom-tests-osx-10.7-multiconfig/workspace/NV/1.6.1/PV/2.7/result_images/test_text/expected-font_styles_pdf.png (RMS 23.409)
======================================================================
FAIL: matplotlib.tests.test_text.test_font_styles.test
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/Shared/Jenkins/Home/virtualenvs.nose.pil/python2.7-numpy1.6.1/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/Users/Shared/Jenkins/Home/virtualenvs.nose.pil/python2.7-numpy1.6.1/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 35, in failer
result = f(*args, **kwargs)
File "/Users/Shared/Jenkins/Home/virtualenvs.nose.pil/python2.7-numpy1.6.1/lib/python2.7/site-packages/matplotlib/testing/decorators.py", line 126, in do_test
'(RMS %(rms).3f)'%err)
ImageComparisonFailure: images not close: /Users/Shared/Jenkins/Home/jobs/matplotlib-mdboom-tests-osx-10.7-multiconfig/workspace/NV/1.6.1/PV/2.7/result_images/test_text/font_styles_svg.png vs. /Users/Shared/Jenkins/Home/jobs/matplotlib-mdboom-tests-osx-10.7-multiconfig/workspace/NV/1.6.1/PV/2.7/result_images/test_text/expected-font_styles_svg.png (RMS 39.686)
Just to confirm, since I see it in the logs: Have you been removing (and sending me) /Users/Shared/Jenkins/Home/.matplotlib/fontList.cache (since this is running in the Jenkins context) and not ~/.matplotlib/fontList.cache?
Still stumped as to what's going on. The fontList.cache you sent me works perfectly here (after updating the paths).
I did send the Jenkins one - but I think the one I had sent before was generated by Jenkins, so I removed it and then ran your script, which re-generated the file, and now the styles look fine. So somehow, in the restricted Jenkins environment, the font cache file that is generated has issues... I'm now going to run the Jenkins tests again with the fontList.cache file that was generated when I ran your script to see what happens. Anyway, it seems that this is an issue related to running in Jenkins rather than a real matplotlib bug. I'll report back.
Ok, this was indeed some strange artifact of running the tests on Jenkins. If I run the tests sequentially for different Python/Numpy versions, and remove fontList.cache between each run, then things work fine. The issue must be to do with the cache pointing to the fonts in the wrong matplotlib path (i.e. if the 2.7 & 1.6.1 tests run first, then the cache will contain fonts in the 2.7 & 1.6.1 path, which might confuse the other Python versions). Anyway, I don't think this is really a matplotlib bug, so this issue can be closed.
Activity
mdboom commented on Mar 22, 2012
Does deleting your font cache (~/.matplotlib/fontList.cache) help?
mdboom commented on Mar 22, 2012
Can you post your ~/.matplotlib/fontList.cache file? I suspect it isn't indexing the fonts correctly.
astrofrog commented on Mar 22, 2012
I tried removing it but the errors were still there.
The re-generated file is here: http://db.tt/hPWBtpu0
mdboom commented on Mar 22, 2012
Can you run this gist: https://gist.github.com/2159040
Run with debugging messages on and post the console output (also check test.png to see if it looks styled).
python font_styles.py --verbose-debug-annoying
astrofrog commented on Mar 22, 2012
Here is the log: http://pastebin.com/KbSyQ3ym
The text is not styled.
mdboom commented on Mar 22, 2012
Just to confirm, since I see it in the logs: Have you been removing (and sending me) /Users/Shared/Jenkins/Home/.matplotlib/fontList.cache (since this is running in the Jenkins context) and not ~/.matplotlib/fontList.cache?
Still stumped as to what's going on. The fontList.cache you sent me works perfectly here (after updating the paths).
astrofrog commented on Mar 22, 2012
I did send the Jenkins one - but I think the one I had sent before was generated by Jenkins, so I removed it and then ran your script, which re-generated the file, and now the styles look fine. So somehow, in the restricted Jenkins environment, the font cache file that is generated has issues... I'm now going to run the Jenkins tests again with the fontList.cache file that was generated when I ran your script to see what happens. Anyway, it seems that this is an issue related to running in Jenkins rather than a real matplotlib bug. I'll report back.
astrofrog commented on Mar 23, 2012
Ok, this was indeed some strange artifact of running the tests on Jenkins. If I run the tests sequentially for different Python/Numpy versions, and remove fontList.cache between each run, then things work fine. The issue must be to do with the cache pointing to the fonts in the wrong matplotlib path (i.e. if the 2.7 & 1.6.1 tests run first, then the cache will contain fonts in the 2.7 & 1.6.1 path, which might confuse the other Python versions). Anyway, I don't think this is really a matplotlib bug, so this issue can be closed.