Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Closed
jrevans wants to merge2 commits intomatplotlib:masterfromjrevans:issue07

Conversation

jrevans
Copy link

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.

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:
Copy link
Member

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)?

@tacaswelltacaswell added this to thenext point release milestoneAug 12, 2015
@tacaswell
Copy link
Member

Can you add a test for this?

@tacaswell
Copy link
Member

You need to add test test files to the whitelist inmatplotlib.__init__https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/__init__.py#L1403

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)

@tacaswell
Copy link
Member

ping@jrevans Any update on this?

@tacaswell
Copy link
Member

@jrevans Any updates on this?

@jrevans
Copy link
Author

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]
Sent: Saturday, September 26, 2015 11:39 AM
To: matplotlib/matplotlibmatplotlib@noreply.github.com
Cc: James Evansjrevans1@earthlink.net
Subject: Re: [matplotlib] generating fontconfig strings from mpl FontProperties is broken (#4910)

@jrevanshttps://github.com/jrevans Any updates on this?


Reply to this email directly or view it on GitHub#4910 (comment) .

@tacaswell
Copy link
Member

I feel you on crazy day-job issues. I am hoping to get an rc2 out tonight, maybe do an rc3 next weekend?

@tacaswelltacaswell modified the milestones:next bug fix release (2.0.1),next point release (1.5.0)Oct 8, 2015
@tacaswell
Copy link
Member

@jrevans If you get this done it can go in, but we are not going to block on it.

@jrevansjrevans mentioned this pull requestOct 28, 2015
17 tasks
@QuLogicQuLogic modified the milestones:2.0.1 (next bug fix release),2.0.2 (next bug fix release)May 3, 2017
@tacaswelltacaswell modified the milestones:2.1.1 (next bug fix release),2.2 (next feature release)Oct 9, 2017
@jklymak
Copy link
Member

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!

@jklymakjklymak closed thisMay 9, 2018
@anntzer
Copy link
Contributor

Superseded by#15601.

@story645story645 removed this from thefuture releases milestoneOct 6, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

8 participants
@jrevans@tacaswell@jklymak@anntzer@mdboom@WeatherGod@QuLogic@story645

[8]ページ先頭

©2009-2025 Movatter.jp