2013/1/16 Michael Droettboom <md...@stsci.edu>:

> There was a very silly bug lurking in USE_FONTCONFIG=True mode, and I've
> made a PR with a fix here:
>
> https://github.com/matplotlib/matplotlib/pull/1666

  Updated test case with that patch:
http://pcpa.fedorapeople.org/matplotlib-2.7+pull-1666.txt

> However, I thought I'd investigate the issue with the STIX fonts -- I
> actually just upgraded to F18 yesterday, so I thought I'd try what you
> suggest and get matplotlib to use them.
>
> Thanks for taking on packaging for matplotlib, and thanks for understanding
> the importance of running the test suite.
>
> It seems that the stix fonts packages in Fedora only come in .otf format --
> I believe this is how they are shipped upstream as well.  Unfortunately,
> matplotlib has no support for reading .otf files, so these are simply
> unusable to matplotlib.
>
> There are some options:
>
> 1) Include the STIX ttf fonts included with matplotlib in the matplotlib
> package and install them in `matplotlib/mpl-data/fonts/ttf` (as a vanilla
> install would do) so as not to conflict with the stix-fonts package.  Maybe
> these go in a python-matplotlib-stix-fonts package.

  For the sake of correctness, I believe this should be the better option.
I did:
$ sudo mkdir /usr/lib64/python2.7/site-packages/matplotlib/mpl-data/fonts/ttf
$ sudo cp -a matplotlib-1.2.0/lib/matplotlib/mpl-data/fonts/ttf/*STIX*
/usr/lib64/python2.7/site-packages/matplotlib/mpl-data/fontsSave: No
changes need to be saved, save again to override -- nothing saved.
$ ls /usr/lib64/python2.7/site-packages/matplotlib/mpl-data/fonts/ttf/
LICENSE_STIX           STIXNonUniBol.ttf      STIXSizOneSymBol.ttf
STIXGeneralBolIta.ttf  STIXNonUniIta.ttf      STIXSizOneSymReg.ttf
STIXGeneralBol.ttf     STIXNonUni.ttf         STIXSizThreeSymBol.ttf
STIXGeneralItalic.ttf  STIXSizFiveSymReg.ttf  STIXSizThreeSymReg.ttf
STIXGeneral.ttf        STIXSizFourSymBol.ttf  STIXSizTwoSymBol.ttf
STIXNonUniBolIta.ttf   STIXSizFourSymReg.ttf  STIXSizTwoSymReg.ttf

This should require asking permission for bundling, but not duplicating
as ttf stix font are not installed. Before asking for it, you may want to
look at the test results:
http://pcpa.fedorapeople.org/matplotlib-2.7-mpl-data-with-bundled-stix-ttf.txt
Because I did not see any difference on the results, so I probably missed
some step...

> 2) Include a version of the STIX fonts converted to ttf.  This will still
> have the problem that the glyph tables in matplotlib need to be updated to
> use them.
>
> 3) Update matplotlib's freetype wrapper to support .otf fonts.  Doable, but
> considerable work.
>
> 4) Leave it as is but warn that STIX font support is broken with the Fedora
> matplotlib package.
>
> Mike

I actually did submit an update
https://admin.fedoraproject.org/updates/python-matplotlib-1.2.0-7.fc18
before you posted about
https://github.com/matplotlib/matplotlib/pull/1666
So would prefer a more complete review before overriding it.
The update should be in queue for a week before going to
mirrors, so it can be revoked and a better update submitted.

Thanks,
Paulo

------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to