backend_svg, backend_cairo on trunk need attention

In case any devels are interested in making more backends work on the trunk:

Running examples/backend_driver.py yields quite a few svg plots that are incorrect, with things like colorbars missing their colors.

The cairo backend does better, but also needs a little work. Cairo is looking more interesting with the latest release; the notes say that eps output is now supported.

Eric

Also, sibpixel rendering of fonts is supported in the new Cairo. On an LCD
monitor, fonts look sharper with Cairo than they do with AGG.

···

On Tuesday 22 April 2008 02:54:09 pm Eric Firing wrote:

In case any devels are interested in making more backends work on the
trunk:

Running examples/backend_driver.py yields quite a few svg plots that are
incorrect, with things like colorbars missing their colors.

The cairo backend does better, but also needs a little work. Cairo is
looking more interesting with the latest release; the notes say that eps
output is now supported.

My concern with subpixel rendering has always been that it's fine for interactive use, but for producing plots that may end up on someone else's screen or on a printer, it can actually make matters much worse.

Agg (well freetype really) could do subpixel font rendering as well, but I deliberately stayed away from it last time I looked at fonts. We could have some mechanism to determine whether the render is intended for a GUI or a file, but that would have to be dealt with carefully so as not to introduce more backend selection and context related problems.

Cheers,
Mike

Darren Dale wrote:

···

On Tuesday 22 April 2008 02:54:09 pm Eric Firing wrote:
  

In case any devels are interested in making more backends work on the
trunk:

Running examples/backend_driver.py yields quite a few svg plots that are
incorrect, with things like colorbars missing their colors.

The cairo backend does better, but also needs a little work. Cairo is
looking more interesting with the latest release; the notes say that eps
output is now supported.
    
Also, sibpixel rendering of fonts is supported in the new Cairo. On an LCD monitor, fonts look sharper with Cairo than they do with AGG.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options
  
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

Naturally.

As such, cairo lets you explicitly choose what you want to draw by
setting one of the following values in your font options:

CAIRO_ANTIALIAS_NONE: Use a bilevel alpha mask.

CAIRO_ANTIALIAS_GRAY: Perform single-color antialiasing (using
    shades of gray for black text on a white background, for example).

CAIRO_ANTIALIAS_SUBPIXEL: Perform antialiasing by taking
    advantage of the order of subpixel elements on devices
    such as LCD panels

And most importantly, the default value is as follows:

  CAIRO_ANTIALIAS_DEFAULT: Use the default antialiasing for
    the subsystem and target device

So, (excepting bugs), you should really have to go out of your way to
get cairo to do the wrong thing here.

-Carl

···

On Tue, 22 Apr 2008 15:41:26 -0400, Michael Droettboom wrote:

My concern with subpixel rendering has always been that it's fine for
interactive use, but for producing plots that may end up on someone
else's screen or on a printer, it can actually make matters much worse.