Andy Beardmore wrote:
>I finally bit the bullet and upgraded my laptop from mandrake 9.1 to
>Ubuntu 4.01. I have been wanting a debian based distro on it for ages...
>
>In the process I upgraded matplotlib from 0.61.x to 0.63.4.
>I installed the python-matplotlib deb package linked to from the
>matplotlib website, and finally managed to solve all the dependencies
>in order to get matplotlib to work - there was a numarray
>extension package that needed to be installed in addition to the main
>numarray one.
>
>Anyway, the upshot is matplotlib runs but it is not finding the
>sans font and makes a poor substitute in its place. For exampe the output
>from simple_demo.py is :
>
>examples/simple_plot.py
>/usr/lib/python2.3/site-packages/matplotlib/backends/backend_gtk.py:1077:
>DeprecationWarning:
> self.append_space()
>/usr/lib/python2.3/site-packages/matplotlib/backends/backend_gtk.py:1077:
>GtkWarning: mixing deprecated and non-deprecated GtkToolbar API is not
>allowed
> self.append_space()
>/usr/lib/python2.3/site-packages/matplotlib/backends/backend_gtk.py:1080:
>DeprecationWarning:
> self.append_widget(self.message, '', '')
>/usr/lib/python2.3/site-packages/matplotlib/backends/backend_gtk.py:1080:
>GtkWarning: mixing deprecated and non-deprecated GtkToolbar API is not
>allowed
> self.append_widget(self.message, '', '')
>Could not match sans-serif, normal, normal. Returning
>/usr/share/matplotlib/cmmi10.ttf
>Could not match sans-serif, normal, normal. Returning
>/usr/share/matplotlib/cmmi10.ttf
>Could not match sans-serif, normal, normal. Returning
>/usr/share/matplotlib/cmmi10.ttf
>
>
>Is there any way I can force it to use a better looking font ?
>Or even find out what has happened to the sans-serif font?
>
>
Have you tried setting the TTFPATH environment variable to the paths
where your other TTF fonts are located? It appears that the default
font paths that matplotlib uses are not the ones used by Ubuntu. It
might also be useful to print the FontManager.ttfdict attribute to see
what fonts have actually been found.
-- Paul
--
Paul Barrett, PhD Space Telescope Science Institute
Phone: 410-338-4475 ESS/Science Software Branch
FAX: 410-338-4767 Baltimore, MD 21218
|