I made some improvements to the usetex option over the last few days in order
to make font selection fit seemlessly with the rest of Matplotlib. The usetex
option will now respect the serif, sans-serif, monospace, and cursive rc
settings. Usetex looks until it finds a latex-compatible font, or defaults to
computer modern. Proper font support with plainTeX is more difficult, and
everyone seems to use the latex backend anyway, so I am dropping support of
the tex engine. With these changes, the font.latex.package and the
text.tex.engine rc settings are no longer needed, and should be removed from
ones personal matplotlibrc file.
Here are the currently supported latex fonts:
- serif: Times, Palatino, Bookman, New Century Schoolbook, Charter, Computer
Modern Roman (Times and Palatino have their own math fonts, the others
default to computer modern math fonts)
- sans-serif: Helvetica, Avant Garde, Computer Modern Sans Serif (I added
Avant Garde to the matplotlibrc.template)
- monospace: Courier, Computer Modern Typewriter
- cursive: Zapf Chancery
The font.family setting is respected and should be used to switch from one
family to another. Cursive fonts are supported with latex, but fantasy fonts
are not (raises a warning and defaults to serif). If you use the usetex
option, please kick the tires and let me know how it goes.
Darren
|