[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft] libXft patch to use the built-in FreeType LCD color filtering
From: |
David Turner |
Subject: |
[ft] libXft patch to use the built-in FreeType LCD color filtering |
Date: |
Thu, 28 Sep 2006 19:01:34 +0200 |
Hello everyone,
here's a patch to libXft-2.1.7 that modifies the library to use the new
built-in FreeType LCD color filtering features. What this means is 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)
I'd appreciate if Werner could store it somewhere on the FreeType server
(since I still don't have access to it due to really weird things going on
at the freedesktop.org hosting machine)
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 !!
libXft-2.1.7-lcd-filter-1.patch
Description: Text Data
- [ft] libXft patch to use the built-in FreeType LCD color filtering,
David Turner <=