Hello everyone,

I've written a patch to libXft-2.1.7 that modifies the library to use the new
built-in FreeType LCD color filtering features. It is currently available at:

  http://david.freetype.org/lcd/libXft-2.1.7-lcd-filter-1.patch

Note that:

- IMPORTANT: the patched library will *not* compile if you haven't FreeType
             CVS, 2.2.2 or better previously installed !!

  since I didn't want to lose my time with configure.ac and all, this
  is detected by a #error statement at compile time, not configuration
  time. Any volunteer to move the check to the config script ?

- the patched library doesn't care if FT_CONFIG_OPTION_SUBPIXEL_RENDERING
  was defined in your FreeType build. If the feature is disabled, it will
  simply be tricked into displaying normal anti-aliased glyphs (even if
  the slower LCD-decimated glyph composition function will be used with
  XRender).

  it might be better, performance wise, to test if the feature is disabled
  initially, and if so, to only use the faster gray-level composition
  functions. However, I'll leave this to another patch.

- the patch only uses FT_LCD_FILTER_DEFAULT at the moment. It shall be
  fairly trivial to update the code to use different filters based on
  user choices (the equivalent of "light" and "strong" hinting on MacOSX),
  but this needs updates to the fontconfig stuff used to store and process
  this kind of preferences beforehand, plus make it available to
  preferences dialog like gnome-font-properties


As usual, please report any problem. The patch was tested in all modes
(mono, gray, RGB, BGR, VRGB, VBGR) but I admit I didn't test all
funky cases (e.g. transformed/rotated text)

Installing this patch after 2.2.2 (a.k.a. current CVS at the moment), should
affect all KDE applications, and some others that use libXft to render text
(e.g. FireFox, Thunderbird). GTK/Gnome applications are likely not to be
affected, since this will require a patch to Cairo, which I'll try to
provide later.

There will probably be several Cairo patches, because the font rendering
internals have changed quite a bit between the various recent releases of
the library (e.g. 1.0.4, 1.1.6, 1.2.0)

Regards, and enjoy !! 
- David Turner
- The FreeType Project  (www.freetype.org)



_______________________________________________
Freetype mailing list
Freetype@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype

Reply via email to