Michael Droettboom wrote:
> 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.

I just committed code to support fontconfig patterns on all of the 
mathtext.* fonts.  You can also use fontconfig patterns in the pylab and 
OO interfaces -- e.g.:

    title("This is my title", fontproperties="Helvetica:italic")

(Note this doesn't actually use fontconfig -- I've just borrowed its 
font-specification syntax.)

I was thinking we probably want to collapse the following options down 
to one as well --->

#font.family         : sans-serif
#font.style          : normal
#font.variant        : normal
#font.weight         : medium
#font.stretch        : normal
# note that font.size controls default text sizes.  To configure
# special text sizes tick labels, axes, labels, title, etc, see the rc
# settings for axes and ticks. Special text sizes can be defined
# relative to font.size, using the following values: xx-small, x-small,
# small, medium, large, x-large, xx-large, larger, or smaller
#font.size           : 12.0

probably to "font.default" ?  For backward compatibility, we probably 
want to continue to support these, but "font.default" would override 
them if provided.  Any ideas on how to best do that?  I only have a 
rough sense of where the new traited config stuff is going wrt backward 
compatibility etc.

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to