From: Paul B. <ba...@st...> - 2004-03-18 15:53:19
|
John Hunter wrote: > > 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 > header I had thought about this and will add it to my to-do list. > * 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? In my previous message, the active word is 'basic'. I just wanted to get some code in that worked, so you could evaluate and comment on it. Also, I thought it best to make a minimal set of changes initially, since this module affects so many other modules. A large set of changes might have caused lots of problems. In future, I should be able to make more modifications to one or two files at a time. I haven't had a chance to go through all the code yet to make sure it is all consistent. So the short answer is: I left it as is, because it worked. :) This is on my list of things to-do. > * 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 Yes, the user docs are also on my to-do list, but I'll also add the tutorial and FAQ documentation. > * 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. The issue of cacheing the most recently used fonts had crossed my mind. I'll look into it, particularly for Windows systems. > * 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 :-) I'll make sure to describe this issue in the documentation. However, in reply to your comment, it is my opinion that the fontname attribute should be depricated in favor of fontfamily, which is a list of named fonts. The font manager has a preliminary list of recommended font families that the user can use. Vera is one of the named fonts in the 'sans' family, though not high on the list, since there are potentlially nicer fonts that can be used. The font manager prepends the list of fonts indicated by TTFPATH to the list of system fonts that it finds. So if Vera is in TTFPATH, then it should be available. If not, then I'll look into it. Please let me know what changes you would like to this module. In the mean time, I'll continue to make modifications. -- Paul -- Paul Barrett, PhD Space Telescope Science Institute Phone: 410-338-4475 ESS/Science Software Branch FAX: 410-338-4767 Baltimore, MD 21218 |