First of all, amazing work. It's very impressive that you made so
many changes from the frontend to the backend to the config file and
everything still works!
> I've committed a new font manager to CVS. It is based on
> the W3C Cascading Style Sheet, Level 1 (CSS1) design. It is
> still rather basic, but does seem to work for most of the
> backends. Therefore, FontTools, ttfquery, and
> ttf_font_manager are no longer needed by matplotlib.
Excellent to hear - that was a maintenance nightmare. I'll put in an
admin request to finally get those dir trees purged from CVS.
BTW, I added the agg2 tree to CVS so you should be able to build
matplotlib cleanly with a CVS checkout. No need to copy files and
dirs anymore. I also remove gtkgd, which was never more than a
> The font manager currently handle only TrueType fonts, but
> should be generalizable to other font types.
> The text object now has a fontproperties attribute which
> describes the basic aspects of the font, such as family,
> style, weight and size. This attribute replaces the
> fontname, fontangle, fontweight, and fontsize attributes.
> In future, I would suggest using font name sizes, such as
> small, medium, and large, to specify font sizes, instead of
> point sizes. This should make it easier for font sizes to
> be consistent across backends. It will also make it easier
> to change all the fonts just by changing the default font
> size that is associated with the medium font name. The
> default value for this is 12.
> The other interface issue to be aware of is the font family.
> This is a list of font names in order of decreasing
> priority. This should make it easier to match similar fonts
> across the various platforms.
I printed out the code so I'll take it home and give it a close
reading tonight. Here are a few things I noticed while poking around
* we should cite the ttfquery license since some of font_manager code
appears to be borrowed from it. I added license/LICENSE_TTFQUERY
to CVS so you can just refer to that file in the font_manager
* the default file .matplotlibrc in the matplotlib root dir needs to
be updated with the properties you added to rcParams. With
comments and commented examples would be most useful. I noticed
that in the rc params in matplotlib.__init__.py you specify default
sizes in points rather than relative sizes - what's the logic here?
* Could you write some tutorial and/or user documentation? The two
most important files are htdocs/fonts.html.template and
htdocs/backends.html.template. Also, a blurb for "what's new" for
the next release would be great. It might also be nice to have
something along the lines of a FAQ "Hey my fonts have changed, how
can I get the old ones back?" in htdocs/faqs.html.template
* It does not appear you are cacheing the results anywhere. On my
modern linux system with not so many fonts, I don't notice any
performance hit. I wonder if this might be a problem for a win32
user with lots of ttf files and a not so speedy computer.
* I have some concern about the finder algorithm, at least in
combination with setting a default font in matplotlibrc. Eg, if I
untar the following dir on my linux system (which contains a lot of
ttf fonts) http://nitace.bsd.uchicago.edu:8080/files/share/ttf.tar
and then point to them with my TTFPATH, and set
text.fontname : Vera in matplotlibrc, I don't get Vera.
This may be answered by the FAQ above