Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
generating fontconfig strings from mpl FontProperties is broken#4910
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
documentation). This added a leading ':' character when there shouldn't havebeen one. the 'family' parameter was being improperly escaped. This was adding'family=' for the 'family' parameter when it shouldn't be there. The result wasthat FontConfig would generate a pattern, but couldn't correctly read it backin. This has now been fixed.
# Handle 'family' first and escape it properly | ||
family = d.get_family() | ||
if family: | ||
if type(family) == list: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
shouldn't this beisinstance(family, list)
?
Can you add a test for this? |
Added a test case.
You need to add test test files to the whitelist in These tests do not pass for me on either python 2 or 3 14:39 $pythontests.py-s--processes=8--process-timeout=300matplotlib.tests.test_fontconfigFE======================================================================ERROR:matplotlib.tests.test_fontconfig.do_test----------------------------------------------------------------------Traceback (mostrecentcalllast):File"/home/tcaswell/.virtualenvs/mpl_2k/lib/python2.7/site-packages/nose-1.3.7-py2.7.egg/nose/case.py",line197,inrunTestself.test(*self.arg)TypeError:do_test()takesexactly2arguments (0given)======================================================================FAIL:matplotlib.tests.test_fontconfig.test_fontconfig----------------------------------------------------------------------Traceback (mostrecentcalllast):File"/home/tcaswell/.virtualenvs/mpl_2k/lib/python2.7/site-packages/nose-1.3.7-py2.7.egg/nose/case.py",line197,inrunTestself.test(*self.arg)File"/home/tcaswell/source/my_source/matplotlib/lib/matplotlib/tests/test_fontconfig.py",line40,intest_fontconfigdo_test(f1,s1)File"/home/tcaswell/source/my_source/matplotlib/lib/matplotlib/tests/test_fontconfig.py",line28,indo_testassert_equal(fc,expected)AssertionError:u'Bitstream Vera Sans:style=normal:variant=normal:weight=400:stretch=normal:size [truncated]... != u"u'sans\\-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=1 [truncated]...-BitstreamVeraSans:style=normal:variant=normal:weight=400:stretch=normal:size=12.0?^^^------------^^^+u'sans\-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0'?^^+++++++^^^^^^+----------------------------------------------------------------------Ran2testsin0.383sFAILED (errors=1,failures=1) |
ping@jrevans Any update on this? |
@jrevans Any updates on this? |
I apologize for the delayed response. Things have been really busy at the day job. I expect to have some time in the upcoming week to get back to some of the remaining open issues/questions. --James Evans From: Thomas A Caswell [mailto:notifications@github.com] @jrevanshttps://github.com/jrevans Any updates on this? — |
I feel you on crazy day-job issues. I am hoping to get an rc2 out tonight, maybe do an rc3 next weekend? |
@jrevans If you get this done it can go in, but we are not going to block on it. |
Given the amount of recent fontconfig work I'm going to guess this is now obsolete. Feel free to re-open if I'm mistaken! Thanks! |
Superseded by#15601. |
This was making invalid fontconfig strings (as per the fontconfig documentation). This added a leading ':' character when there shouldn't have been one. the 'family' parameter was being improperly escaped. This was adding 'family=' for the 'family' parameter when it shouldn't be there. The result was
that FontConfig would generate a pattern, but couldn't correctly read it back in. This has now been fixed.
This addresses an issue in#4897.