From: Michael D. <md...@st...> - 2013-01-16 17:55:41
|
On 01/16/2013 12:22 PM, Paulo César Pereira de Andrade wrote: > 2013/1/16 Michael Droettboom <md...@st...>: > >>> -USE_FONTCONFIG = False >>> +USE_FONTCONFIG = True > [...] >>> I think this is safe to be made a patch for Linux distros. I believe this could >>> be the default for *Linux and *BSD in matplotlib. >>> >> This will silence things, and I agree it probably should be the default >> on Linux, but I'm not sure if it's correct. If F18 really does have > So far I managed to "apparently" solve my issues with my work in > progress sagemath package for fedora. > >> STIX 1.1, then it's not going to work since the layout of the fonts has >> changed so much. That's going to require a great deal of effort. Can > Yes, it has STIX 1.1. > >> you successfully run the test suite with this change? That should catch > Sorry that I am not much experienced with matplotlib, but I am willing to > help in whatever I can, given that now I can modify/update the matplotlib > package in Fedora. After running it for the first time, and not looking > much at the sources, it appears to have way too many test failures... > > $ nosetests-2.7 -v matplotlib.tests 2>&1 | tee ~/matplotlib-2.7.txt > http://pcpa.fedorapeople.org/matplotlib-2.7.txt > > $ nosetests-3.3 -v matplotlib.tests 2>&1 | tee ~/matplotlib-3.3.txt > http://pcpa.fedorapeople.org/matplotlib-3.3.txt > >> any glyph mismatch problems. Is there a way to have the package depend >> on 1.0 version of the fonts until matplotlib has a chance to update its >> tables? > I am afraid this may not be an option (using stix fonts 1.0). > > 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 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. 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 |