Michael Droettboom <mdroe@...83...> writes:
Paul Smith wrote:
> Hi Michael,
>
> I put in the rc line you suggested below into fonts_demo.py but didn't see
it
> print any extra info (but did confirm in ipython that rcParams showed
> verbose.level had changed to "annoying"). It just quietly finished
otherwise.
> Did I miss something here?
>
Does it work if you put this into your matplotlibrc?verbose.level: debug-annoying
(Note it's debug-annoying, not simply annoying)
> I've linked the output of fonts_demo.py to;
> https://www.box.net/shared/static/o693hq3soo.png
>
Hmm. That font is definitely not Vera Sans. Something really odd is
going on here.
I can appreciate that goal -- and AFAIK it does work for other users on
Ubuntu 7.10 so there is probably just
some configuration problem here that we can hopefully get to the bottom of.
Do you have any customizations in your matplotlibrc?
Cheers,
Mike
Mike,
I've not made any other changes to matplotlibrc. In fact I only just now have
copied the one in /etc to my $HOME/.matplotlib directory. It still seemed to
pick up the /etc version as you'll see below, I guess coz I was sudo'd as
root? anyway...
Interesting the font search path seems to only include mpl-data fonts, but it
does seem to know about the ones in /usr/share/fonts/truetype/freefont. Then
fails to use one, so we're always back to cmr10. The output below was for my
test plot but it's pretty much the same (longer) story for fonts_demo.py I
tried copying all the freetype fonts into mpl-data/font and everything came
out FreeSansOblique. Still failed to find the correct font, but used something
a little closer. What do you make of it?
I'll be away for a while but I'll check the list if I can.
Cheers,
Paul
debug-annoying dump from my test plot program
···
----------------------------------------
loaded rc file /etc/matplotlibrc
matplotlib version 0.90.1
verbose.level debug-annoying
interactive is False
units is True
platform is linux2
loaded modules:
['_bisect', 'distutils', 'random', 'datetime', 'matplotlib.tempfile', 'distutil
s.sysconfig', 'encodings.encodings', 'pytz.cStringIO', 'struct', 'tempfile', 'p
ytz.os', 'zipimport', 'string', 'encodings.utf_8', 'matplotlib.__future__', 'py
tz.tzinfo', 'pytz.datetime', 'distutils.re', 'bisect', 'signal', 'matplotlib.py
tz', 'pytz.tzfile', 'cStringIO', 'locale', 'encodings', 'dateutil', 'matplotlib
.warnings', 'pytz.pytz', 'matplotlib.sys', 're', 'math', 'fcntl', 'UserDict', '
distutils.os', 'matplotlib', 'codecs', 'md5', '_locale', 'matplotlib.os', 'thre
ad', 'itertools', 'distutils.sys', 'os', '__future__', '_sre', '__builtin__', '
matplotlib.re', 'operator', 'distutils.string', 'matplotlib.datetime', 'posixpa
th', 'errno', 'binascii', 'sre_constants', 'matplotlib.md5', 'types', 'pytz.sys
', '_codecs', 'pytz', 'copy', '_struct', '_types', 'matplotlib.dateutil', 'hash
lib', 'posix', 'encodings.aliases', 'exceptions', 'sre_parse', 'pytz.bisect', '
distutils.distutils', 'copy_reg', 'sre_compile', '_hashlib', '_random', 'pytz.s
truct', 'site', '__main__', 'shutil', 'strop', 'encodings.codecs', 'gettext', '
pytz.sets', 'stat', 'warnings', 'encodings.types', 'sys', 'os.path', 'pytz.gett
ext', 'matplotlib.distutils', 'distutils.errors', 'linecache', 'matplotlib.shut
il', 'sets']
numerix numpy 1.0.3
font search path ['/usr/share/matplotlib/mpl-
data/fonts/ttf', '/usr/share/matplotlib/mpl-data/fonts/afm']
trying fontname /usr/share/matplotlib/mpl-data/fonts/ttf/cmr10.ttf
trying fontname /usr/share/matplotlib/mpl-data/fonts/ttf/cmtt10.ttf
trying fontname /usr/share/matplotlib/mpl-data/fonts/ttf/cmmi10.ttf
trying fontname /usr/share/matplotlib/mpl-data/fonts/ttf/cmex10.ttf
trying fontname /usr/share/matplotlib/mpl-data/fonts/ttf/cmsy10.ttf
trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Bold.ttf
trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed-
Bold.ttf
trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-Oblique.ttf
trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-
Oblique.ttf
trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed.ttf
trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Italic.ttf
trying fontname /usr/share/fonts/truetype/freefont/FreeSerifBoldItalic.ttf
trying fontname /usr/share/fonts/truetype/freefont/FreeMonoOblique.ttf
trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-BoldItalic.ttf
trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf
trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf
trying fontname /usr/share/fonts/truetype/freefont/FreeSerif.ttf
trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif-Bold.ttf
trying fontname /usr/share/fonts/truetype/freefont/FreeSerifBold.ttf
trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerif.ttf
trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed-
Italic.ttf
trying fontname /usr/share/fonts/truetype/freefont/FreeSansOblique.ttf
trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed.ttf
trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-
Bold.ttf
trying fontname /usr/share/fonts/truetype/freefont/FreeSansBoldOblique.ttf
trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Oblique.ttf
trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSerifCondensed-
BoldItalic.ttf
trying fontname /usr/share/fonts/truetype/freefont/FreeMonoBoldOblique.ttf
trying fontname /usr/share/fonts/truetype/freefont/FreeSansBold.ttf
trying fontname /usr/share/fonts/truetype/freefont/FreeSans.ttf
trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-BoldOblique.ttf
trying fontname /usr/share/fonts/truetype/freefont/FreeMono.ttf
trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono-
BoldOblique.ttf
trying fontname /usr/share/fonts/truetype/freefont/FreeSerifItalic.ttf
trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansCondensed-
BoldOblique.ttf
trying fontname /usr/share/fonts/truetype/freefont/FreeMonoBold.ttf
trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-Bold.ttf
trying fontname /usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-ExtraLight.ttf
$HOME=/root
CONFIGDIR=/root/.matplotlib
loaded ttfcache file /root/.matplotlib/ttffont.cache
matplotlib data path /usr/share/matplotlib/mpl-data
backend Agg version v2.2
backend_agg.new_figure_manager
FigureCanvasAgg.draw
RendererAgg.__init__
RendererAgg.__init__ width=640.0, height=480.0
RendererAgg.__init__ _RendererAgg done
RendererAgg.__init__ done
RendererAgg._get_agg_font
findfont failed Arial
findfont failed FreeSans
Could not match FreeSans, normal, normal. Returning /usr/share/matplotlib/mpl-
data/fonts/ttf/cmr10.ttf
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
----cut bunch of rendering stuff------