Darren Dale wrote: > On Wednesday 22 August 2007 4:20:08 pm Michael Droettboom wrote: >> Darren Dale wrote: >>> If you want all that flexibility, why not do it in the usual way: >>> >>> #mathtext.it.family : 'serif' >>> #mathtext.it.style : 'oblique' >> That seems reasonable. I think I had a mental block around this because >> of the verbosity (and seeing a font specification as a single unit), but >> it does seem to fit in much better with the existing options (i.e. a >> subset of font.*). >> >> *IF* fontconfig is ever adopted, we could use fontconfig patterns as an >> alternative, which are at least some kind of standard. > > Right: > > mathtext.it : serif-12:italic # use the default serif, 12 pt italic > or > mathtext.it : times:italic # use the times italic font, default size > > Could this syntax be adopted, even without fontconfig? Then if we decided to > use fontconfig in the future, the disruption would not be too great.
Sure, it's certainly an easy enough format to support. Of course, the matching algorithm used by font_manager.py is different from fontconfig. font_manager.py essentially looks for an exact match or falls back to a single default. fontconfig does a nearest neighbor search, so often finds a better alternative. So even if they use the same syntax, the results will be different (in some side cases) if we ever move over to fontconfig. (There are pros and cons to using fontconfig already discussed on this list. I'm not really advocating for or against it myself.) Still, IMHO, it's worth supporting this syntax now even though users may need to change their font specifiers later -- those changes should be more minor than if we go with #mathtext.it.family : 'serif' #mathtext.it.style : 'oblique' now. If we go this way, it would also be worthwhile to support this syntax internally (anywhere a FontProperties object is currently accepted it could alternatively be a fontconfig string.) Cheers, Mike ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel