Created attachment 37182 [details] [review] Add support for using freetype to handle subpixel LCD text rendering David Turner, the upstream freetype author, has written a patch for libXft to use the freetype subpixel text rendering hooks in the API. In copies of freetype which do not have the subpixel text rendering code enabled, these calls are effectively NOOP, they do not render any differently. Attached is the patch that I applied (after a bit of cleanup) to Fedora's rawhide libXft and tested. Because Fedora's freetype doesn't do any real subpixel text rendering, there is no difference between the session with libXft patched vs unpatched. For proof, I offer screenshots of xterm -fa Monospace: http://spot.fedorapeople.org/libXft-lcd-patch/BEFORE-xterm-fa-Monospace.png http://spot.fedorapeople.org/libXft-lcd-patch/AFTER-xterm-fa-Monospace.png The core benefit of this patch is that: * Users who have the legal option of running freetype with enabled subpixel text rendering will see that functionality enabled across libXft and cairo. * When those patents expire (or are declared invalid), libXft will not require any changes to leverage a freetype with enabled subpixel text rendering. As an additional note: this patch has been applied to Debian's copy of libXft for some time now.
On Mon, Jul 19, 2010 at 11:10:41 -0700, bugzilla-daemon@freedesktop.org wrote: > As an additional note: this patch has been applied to Debian's copy of libXft > for some time now. > Maybe you mean Ubuntu's? I don't think we're patching libXft, whereas the patch seems to be in http://patches.ubuntu.com/x/xft/xft_2.1.14-2ubuntu1.patch
Hmm, you're right. I could have sworn I saw it in the Debian patchset, as I don't normally even bother digging in Ubuntu packages for patchsets. My apologies! The rest of the bug ticket still holds, though. :)
The patch unfortunately does not apply any more, and the current one in the downstream http://patches.ubuntu.com/x/xft/xft_2.2.0-3ubuntu1.patch also does not apply to current git. If you were to update the patch to current git, I would be happy to review it and wrangle it in to a release.
Okay, I'll take a shot at it.
Created attachment 52055 [details] [review] Patch01 of 02 - Subpixel LCD text rendering improvements
Created attachment 52056 [details] [review] Patch 02 of 02 Compiler noise cleanups related to subpixel LCD changes
Here are patches against git as of an hour ago.
Thanks. I'll review and test later this week.
FC_LCD_FILTER was added in 2008 and is in 2.5.92. It seems better to me that we rely on a version of fontconfig with FC_LCD_FILTER. I pushed your changes along with a followup to remove ifdef-fu: To ssh://git.freedesktop.org/git/xorg/lib/libXft 0e0efb8..550b2f7 master -> master Thanks
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.