John Hunter wrote:
> On Sat, May 9, 2009 at 9:32 AM, Freddie Witherden <fred...@witherden.org> 
> wrote:
>> Hi all,
>>
>> As some of you probably know I am working on the GSoC project to
>> externalise the Mathtex engine from Matplotlib. Today I have been
>> toying around with the renderer using various backends.
>>
>> One of the interesting things that I discovered was that the Cairo
>> backend was making use of subpixel rendering. (Or 'ClearType' as
>> Microsoft call it.) This is not surprising -- by default Cairo will
>> respect a users fontconfig settings when rendering text. Since I have
>> subpixel rendering enabled all text rendered by Cairo is subpixel
>> rendered.
>>
>> While this is fantastic for on screen text -- being significantly more
>> pleasing to look at that the text produced by the AGG backend -- it is
>> unsuitable for print. Now it is not too difficult to disable this,
>> Cairo has an API call: cairo_font_options_set_antialias to deal with
>> this.
>>
>> While I could write a quick patch to always disable subpixel rendering
>> it would be something off a loss to those who either view their graphs
>> onscreen or export them for the web -- where using subpixel rendering
>> is now surprisingly common.
>>
>> Is it worth looking into adding subpixel rendering as a configuration
>> option?
> 
> The matplotlib.lines.Line2D objects has an antialiased property -- we
> could add the same property to matplotlib.text.Text to turn on/off
> subpixel rendering (which could also be supported as an rc param)

I haven't poked around, so this may be a stupid question, but: for 
cairo, can subpixel rendering simply be left on for screen display and 
automatically turned off when writing to a file via savefig?  If this 
can be done, it seems like a better solution than requiring to the user 
to turn the parameter on and off manually, depending on whether show() 
or savefig() is being called.

Eric

> 
> JDH

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to