To those not wishing to do command line style hacking with its inherent risks and frustrations (and possible damages) should stop reading now, and just be happy with the fonts as you have them. This is a lot of trouble, so if you aren't ready for that, don't try it.
Unfortunately, I could not find information about doing this on Fedoras later than 6 except to just --force it in there, and it worked for me on FC6, F7, and CENTOS5.
David Tuner of freetype created some excellent patches which provide superior subpixel redering which very much improves the appearance of fonts. At one time, these patches were readily available and could be applied to the packages of the day. Since then, David Turner made the decision that these patches could infringe on patents and so since then, these patches have not been maintained and upgraded to the latest packages. The freetype portion of the patches does exist in current freetype packages, but is shipped disabled. Unfortunately, there are 2 other areas where patches are needed and these are not maintained: cairo and Xft. Without the cairo and Xft patches, I could not get acceptable subpixel rendering. Searching for the magic lamp, led to this howto, as I might want to implement this again, and I am certain that I will loose the notes. As every howto on subpixel rendering I found was wanting, this one probably is also.
How to create rpmbuild directory
Google search for "david turner subpixel"
Get the patches
http://quanli.googlepages.com/davidt...esfordebiansid
freetype-2.2.1-subpixel-disable-quantization.diff
libcairo-1.2.4-lcd-cleartype-like.diff
libXft-2.1.8.2-lcd-cleartype-like.diff
copy/move to ~/rpmbuild/
SOURCES
NOTE:
(see:
http://www.danns.co.uk/node/196
for an excellent description and review of the subpixel patches)
Get the SRPMS
http://download.fedora.redhat.com/pub/fedora
Nav to your SRPMS
FC6
linux -> core -> 6 -> source -> SRPMS
cairo-1.2.4-1.fc6.src.rpm
freetype-2.2.1-10.fc6.src.rpm
libXft-2.1.10-1.1.src.rpm
copy/move to ~/rpmbuild/
SRPMS
NOTE:
(The patch libXft-2.1.8.2-lcd-cleartype-like.diff
applies successfully to libXft-2.1.10-1.1.src.rpm
but not to later ones.)
F7
N/A - use FC6 - naturally, this will break if it gets updated and may break something
Testing some noted for Fedora 7 in Post #2
F8
N/A - use FC6 - naturally, this will break if it gets updated and may break something
CENTOS5
http://mirror.centos.org/centos/5/os/SRPMS/
cairo-1.2.4-2.el5.src.rpm
freetype-2.2.1-19.el5.src.rpm
libXft-2.1.10-1.1.src.rpm
Login as your regular user (not root)
SET UP THE SRPMS
rpm -i ~/rpmbuild/SRPMS/cairo-1.2.4-1.fc6.src.rpm
rpm -i ~/rpmbuild/SRPMS/libXft-2.1.10-1.1.src.rpm
rpm -i ~/rpmbuild/SRPMS/freetype-2.2.1-10.fc6.src.rpm
EDIT THE SPEC FILES TO APPLY THE PATCHES
NOTE: I tried to show in red what changes were made. Had to cut because post too long.
cairo.spec
Code:
...
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Patch0: libcairo-1.2.4-lcd-cleartype-like.diff
...
%prep
%setup -q
%patch0 -p1
%build
...
Note: Enabling bytecode interpreter not necessary, but fun to see windows fonts.
freetype.spec
Code:
# Disables patented bytecode interpreter. Setting to 0 enables
# the bytecode interpreter.
%define without_bytecode_interpreter 0
...
Source1: freetype-doc-%{version}.tar.bz2
Source2: ft2demos-%{version}.tar.bz2
...
Patch0: freetype-2.2.1-subpixel-disable-quantization.diff
# Add -lm when linking X demos
Patch5: ft2demos-2.1.9-mathlib.patch
Patch20: freetype-2.1.10-enable-ft2-bci.patch
...
%prep
%setup -q -b 1 -a 2
%patch0 -p1
pushd ft2demos-%{version}
%patch5 -p1 -b .mathlib
popd
...
libXft.spec
Code:
...
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Source0: ftp://ftp.x.org/pub/individual/lib/%{name}-%{version}.tar.bz2
Patch0: libxft-2.1.8.2-lcd-cleartype-like.diff
...
%prep
%setup -q
%patch0 -p1
# Disable static library creation by default.
%define with_static 0
...
BUILD THE RPMS
rpmbuild -bb ~/rpmbuild/SPECS/freetype.spec
rpmbuild -bb ~/rpmbuild/SPECS/libXft.spec
rpmbuild -bb ~/rpmbuild/SPECS/cairo.spec
NOTE:
(It failed unless you see the build end with:
+ exit 0
)
BACKUP PRIOR TO INSTALLING THE RPMS
NOTE:
(init 3 shuts down X11 gui
You must do this to remove some files
to avoid links pointing to the wrong versions.)
su -
init 3
console login: root
cd /usr/lib
mkdir BAK
cp -av lib{freetype,cairo,Xft}.* BAK/
rm -i lib{freetype,cairo,Xft}.*
(say y-yes to confirm each deletion.)
NOTE:
(It should delete
libcairo.so.2
libcairo.so.2.9.2
libfreetype.so.6
libfreetype.so.6.3.10
libXft.so.2
libXft.so.2.1.2
It may also delete
libcairo.so
libfreetype.so
libXft.so
INSTALL THE RPMS
console logoff (exit)
console login as your user
(As your user -- not root)
cd ~/rpmbuild/RPMS/i386
("su" -- not "su -")
su
rpm -ivh --force freetype-2.2.1-10.i386.rpm
rpm -ivh --force libXft-2.1.10-1.1.i386.rpm
rpm -ivh --force cairo-1.2.4-1.i386.rpm
NOTE: (rpm -Uvh will always failed with the devel installed, so I used rpm -ivh)
CONFIRM INSTALLATION
su
cd /usr/lib
ls -l lib{freetype,cairo,Xft).*
NOTE:
(These files should have today's date and a very recent time.)
BRING UP THE X11 GUI
init 5
SET FOR SUBPIXEL
XFCE4
Use antialiasing for fonts
Use hinting: full
Use subpixex hinting: RGB
GNOME
Subpixel smoothing (LCDs)
Subpixel order: RGB
CHECK
Distrowatch.com is a good test site, because of the lightly colored background. Fonts should look crisp with nearly impossible to notice color fringes.
LeMonde.fr is another good test site to compare with David Turner's screenshot.
IF EVERYTHING WENT WRONG, OR DO NOT LIKE IT
su
cd /usr/lib/BAK
cp -a * ../
I hope I didn't make too many mistakes, but it looks good on my system.