[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: David Turner
Subject: Re: [ft-devel] Playing with FT_CONFIG_OPTION_SUBPIXEL_RENDERING
Date: Wed, 27 Sep 2006 18:34:53 +0200

On Wed, 27 Sep 2006 19:18:31 +0300, "Ismail Donmez" <address@hidden> said:
> Hi David et. al.,
> I played with FT_CONFIG_OPTION_SUBPIXEL_RENDERING today. I installed
> latest 
> freetype from CVS with FT_CONFIG_OPTION_SUBPIXEL_RENDERING enabled. And I 
> tested libXft + your lcd rendering patch and libXft + newest freetype
> with 
> And with the latter I get very poor results compared to the " libXft +
> your 
> lcd rendering patch " combination. So I wonder if libXft should be
> modified 
> to take advantage of FT_CONFIG_OPTION_SUBPIXEL_RENDERING or freetype does
> not 
> yet enable it?

Yes, libXft (and Cairo) should be modified. Here's how the thing is
supposed to work:

if you don't enable FT_CONFIG_OPTION_SUBPIXEL_RENDERING on your build of
FreeType, libXft will be forced to display normal "gray" anti-aliased text,
due to the algorithm it's currently using to filter the colors.

if you enable FT_CONFIG_OPTION_SUBPIXEL_RENDERING on your build of FreeType,
and only use a vanilla libXft on top of it, you're not going to see *any*
changes compared to a previous version of the library.

that's because the built-in color filtering must be enabled by calling
FT_Library_SetLcdFilter( library, FT_LCD_FILTER_DEFAULT ) before loading
any glyphs.

However, if you do add this to a vanilla libXft right now, you'll get poor
results as well, because libXft will do its own color filtering on top of
the one performed by FreeType !

So, I'll try to provide patches soon that essentially modify libXft and
Cairo to:

  - not perform any color filtering on their own
  - call FT_Library_SetLcdFilter in the proper places

this should remove any infringing code from these libraries, and provide the
same "optimized" rendering than the one obtained through my patch, if your
FreeType build has SUBPIXEL_RENDERING turned on.

Hope this helps,

- David Turner
- The FreeType Project  (
> Sorry if it this code not meant to be tested yet, in that case please
> ignore 
> this mail.
> Regards,
> ismail
> -- 
> They that can give up essential liberty to obtain a little temporary
> safety 
> deserve neither liberty nor safety.
> -- Benjamin Franklin
> _______________________________________________
> Freetype-devel mailing list
> address@hidden
- David Turner
- The FreeType Project  (

reply via email to

[Prev in Thread] Current Thread [Next in Thread]