[cairo] Strange bug with colored, sub-pixel rendered text

James Cloos cloos at jhcloos.com
Tue May 1 11:10:34 PDT 2007

>>>>> "Carl" == Carl Worth <cworth at cworth.org> writes:

Carl> I've attached a similar version which differs only by the addition of
Carl> a block of code to explicitly turn on sub-pixel rendering

bug much easier to see; all curves and diagonals show the gray pixels.

Changing to CAIRO_ANTIALIAS_GRAY does not fix the problem, nor does
commenting out cairo_font_options_set_(antialias|subpixel_order).

If you change the color from blue to yellow, the borders change from
black to green.  With magenta they are red on the left and blue on
the right.  With green text, though, it looks (almost?) correct.

I'm using a very recent copy of freetype cvs and cairo git 7e6ab54.
There have been one or two commits to freetype since I last compiled;
neither relevant to this issue.  The changes since 7e6ab54 also seem

  old..new: 7e6ab54..7f7f4d4
 ROADMAP                         |    2 +-
 TODO                            |   13 ++++-
 configure.in                    |    4 +
 perf/Makefile.am                |    2 +-
 perf/cairo-perf-diff-files.c    |    2 +
 perf/cairo-perf.c               |   25 +++++++-
 src/Makefile.am                 |    1 +
 src/cairo-mutex-private.h       |   95 +---------------------------
 src/cairo-mutex-type-private.h  |  131 +++++++++++++++++++++++++++++++++++++++
 src/cairo-scaled-font-private.h |    2 +-
 src/cairo-surface.c             |    2 +-
 src/cairo-win32-surface.c       |   11 ++--
 src/cairo-xlib-surface.c        |    2 +
 13 files changed, 189 insertions(+), 103 deletions(-)

Below is what it looks like using white, which may best illustrate the issue:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ihello.png
Type: image/png
Size: 3917 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20070501/6b056187/ihello.png
-------------- next part --------------

James Cloos <cloos at jhcloos.com>         OpenPGP: 1024D/ED7DAEA6

More information about the cairo mailing list