[cairo] Struggling with subpixel text (last blocker for 1.8)

Carl Worth cworth at cworth.org
Thu Sep 25 05:28:19 PDT 2008


So I stayed up all night trying to get the 1.8 release done.

The test suite was in pretty bad shape as of the last 1.7.6 snapshot.
There were dozens of failing tests, and the causes were all over the
place:

* Stale reference images needing to be updated

* Known bugs that needed to be marked as XFAIL

* New regressions that needed to be fixed

It was pretty tedious work sorting through all that, and for the ones
that were actual regressions we had to actually fix the bugs too. Thanks
to Behdad, Chris, Emmanuel, and Adrian for helping out with that
process.

The final result I got to was a single test not passing, (I
intentionally wasn't testing xlib to avoid X server/driver issues):

	text-antialias-subixel

And this one is a regression. It's giving me grayscale antialiasing
instead of subpixel on image and other backends. The text passes fine
back in 1.6.4.

I bisected the failure down to this large commit:

  commit 7f870035177da7aa63fa33dce837528f442d9ffe
  Author: Sylvain Pasche <sylvain.pasche at gmail.com>
  Date:   Tue Jan 22 23:51:32 2008 +0100

    [cairo-ft] LCD filtering patch from David Turner
    
    This is the patch David Turner wrote some times ago and can be found on
    http://david.freetype.org/lcd/cairo-1.2.4-lcd-filter-1.patch. It was
    somewhat modified for compatibility with cairo 1.5

I spent a fair amount of time trying to debug this, but never succeeded.
So now I'd like some suggestions on how to proceed. One option is to
revert the patch, (it broke an existing test in the test suite after
all). I've got a patch in my personal repository, (revert-lcd-filter
branch), that does this and which seems to work:

    http://cgit.freedesktop.org/~cworth/cairo/log/?h=revert-lcd-filter

But meanwhile, I know that some users were particularly keen on being
able to control, (via fontconfig), the various LCD filter options made
available by freetype. And reverting this patch would remove that
possibility.

Behdad, do you have some guidance here? Can you fix the code so that the
test suite works? Or shall we just go ahead with the revert and bring
back the LCD filter functionality in 1.8.2 or so? I know you were hoping
to wake up and see that the release had already happened. Sorry that
didn't happen, but this is really the last issue left.

-Carl (overdue for sleep)




More information about the cairo mailing list