Simply type XFree86 -version in a console or in an xterm.
Example:
[root@xfcebox2 /root]# XFree86 -version
XFree86 Version 4.1.0 / X Window System
(protocol Version 11, revision 0, vendor release 6510)
Release Date: 2 June 2001
If the server is older than 6-12 months, or if your card is
newer than the above date, look for a newer version before
reporting problems. (See http://www.XFree86.Org/FAQ)
Build Operating System: Linux 2.4.5 i686 [ELF]
Module Loader present
XFree86 has RENDER extension available since version 4.0.2, however, I strongly suggest using XFree84 4.1.x or later (I've been able to use RENDER extension with that version, not before, because it wasn't properly working with the video cards I use, ie ATI Rage Pro, S3 Virge and Trident Image 975)
This has to be performed from an X session, from an xterm. Type xdpyinfo and look in the list of extensions for RENDER.
Example:
[root@xfcebox2 /root]# xdpyinfo
name of display: :0.0
version number: 11.0
vendor string: The XFree86 Project, Inc
vendor release number: 40100000
XFree86 version: 4.1.0
maximum request size: 4194300 bytes
motion buffer size: 256
bitmap unit, bit order, padding: 32, LSBFirst, 32
image byte order: LSBFirst
number of supported pixmap formats: 7
supported pixmap formats:
depth 1, bits_per_pixel 1, scanline_pad 32
depth 4, bits_per_pixel 8, scanline_pad 32
depth 8, bits_per_pixel 8, scanline_pad 32
depth 15, bits_per_pixel 16, scanline_pad 32
depth 16, bits_per_pixel 16, scanline_pad 32
depth 24, bits_per_pixel 32, scanline_pad 32
depth 32, bits_per_pixel 32, scanline_pad 32
keycode range: minimum 8, maximum 255
focus: window 0x1800013, revert to Parent
number of extensions: 24
BIG-REQUESTS
DOUBLE-BUFFER
DPMS
Extended-Visual-Information
FontCache
LBX
MIT-SCREEN-SAVER
MIT-SHM
MIT-SUNDRY-NONSTANDARD
RENDER
SECURITY
SHAPE
SYNC
TOG-CUP
XC-APPGROUP
XC-MISC
XFree86-Bigfont
XFree86-DGA
XFree86-Misc
XFree86-VidModeExtension
XInputExtension
XKEYBOARD
XTEST
XVideo
The RENDER extension has been underlined in the example above.
Note: f you don't have the RENDER extension supported, you won't have anti-aliased font available.
Xft is based on freetype, thus you must load the freetype module. Basically, edit your XF86Config (that can be called XF86Config-4 on some distributions such as RedHat or Mandrake) and make sure you have the following modules loaded in the Module section :
freetype
type1
xft
Example :
Section "Module"
Load "freetype"
Load "type1"
Load "xft"
Load "extmod"
Load "xie"
Load "pex5"
Load "glx"
Load "dri"
Load "GLcore"
Load "dbe"
Load "record"
EndSection
Xft doesn't use the same mechanism as the core X font system. It has its own configuration file. By default, only the directory for "Type1" fonts is listed. That can be confusing, since Xft tries to find a font that matches your request only in the directories listed in XftConfig.
If you are using xfs (X Font Server) by default, the list of font directories will be found in xfs config file, usually /etc/X11/fs/config.
Otherwise, the font directories can be listed directly in the XF86Config (or again XF86Config-4 on RedHat and Mandrake, and possibly other distributions that ship with both XFree3 and XFree4)
Make sure that all the directories listed as font directories are also listed in XftConfig, so the required fonts will be properly matched with the actual font name.
Example :
In my /etc/X11/fs/config I have :
# $XFree86: xc/lib/Xft/XftConfig.cpp,v 1.5 2000/12/14 23:03:53 keithp Exp $dir "/usr/X11R6/lib/X11/fonts/Type1"
#dir "/usr/X11R6/lib/X11/fonts/misc"
#dir "/usr/X11R6/lib/X11/fonts/Speedo"
#dir "/usr/X11R6/lib/X11/fonts/CID"
#dir "/usr/X11R6/lib/X11/fonts/75dpi"
#dir "/usr/X11R6/lib/X11/fonts/mdk"
#dir "/usr/X11R6/lib/X11/fonts/100dpi"
dir "/usr/X11R6/lib/X11/fonts/drakfont"
#dir "/usr/X11R6/lib/X11/fonts/pcf_drakfont"#
# alias 'fixed' for 'mono'
#
match any family == "fixed" edit family =+ "mono";#
#Check users config file
#
includeif "~/.xftconfig"#
# Substitute TrueType fonts for Type1 versions
#
match any family == "Times" edit family += "Times New Roman";
match any family == "Helvetica" edit family += "Arial";
match any family == "Courier" edit family += "Courier New";
match any family == "Lucida" edit family += "Verdana";#
# Use TrueType fonts for defaults
#
match any family == "serif" edit family += "Times New Roman";
match any family == "sans" edit family += "Arial";#
# otherwise, use courier
#
match any family == "mono" edit family += "Courier New";#
# Alias between XLFD families and font file family name, prefer local fonts
#
match any family == "Charter" edit family += "Bitstream Charter";
match any family == "Bitstream Charter" edit family =+ "Charter";match any family == "Lucidux Serif" edit family += "LuciduxSerif";
match any family == "LuciduxSerif" edit family =+ "Lucidux Serif";match any family == "Lucidux Sans" edit family += "LuciduxSans";
match any family == "LuciduxSans" edit family =+ "Lucidux Sans";match any family == "Lucidux Mono" edit family += "LuciduxMono";
match any family == "LuciduxMono" edit family =+ "Lucidux Mono";#
# TrueType font aliases
#
match any family == "Comic Sans" edit family += "Comic Sans MS";
match any family == "Comic Sans MS" edit family =+ "Comic Sans";
match any family == "Trebuchet" edit family += "Trebuchet MS";
match any family == "Trebuchet MS" edit family =+ "Trebuchet";
match any family == "Monotype" edit family =+ "Monotype.com";
match any family == "Andale Mono" edit family += "Monotype.com";
match any family == "Monotype.com" edit family =+ "Andale Mono";
As you may have noticed, most font dirs are commented in that XftConfig file. This is to decrease the startup time of applications that use Xft. Xft scans all font dirs listed and builts its own font mapping. The more directories you have in XftConfig, the longer it will take to launch applications that rely on Xft for font rendering.
The principle is to list only the directories for TrueType fonts since Xft gives best results with TTF fonts. Then, we map other fonts to their TTF conterparts.
For example, we map "Courrier" to "Courrier New", "Helvetica" to "Arial" or even "Lucida" to "Verdana". Thus, if an application asks for "Helvetica" for example, we'll use Arial which is fairly similar. This way, we can greatly improve responsiveness of applications that use Xft.
Start (or restart) the X server, open a terminal and try :
xterm -fa "lucida console" -fs 12
That should open an xterm with "Lucida Console" font antialiased. If you get another antialiased font, it probably means that you either mispelled the font name or the font directory is not listed in the XftConfig file.
Because Xft can slow down applications, Xfce does not include Xft support by default. This means that if you get the binary RPM from Xfce web site Xft support is not compiled in, so you'll need to get the sources and recompile Xfce with Xft support by yourself.
Xft is supported in Xfce since version 3.8.4.
Once you've retrieved the latest Xfce version; cd to root dir of the source tree.
Type
./configure --prefix=/usr --datadir=/usr/share --sysconfdir=/etc/X11 --enable-xft=yes
So that Xfce get compiled exactly like the RPM archive with Xft support enable. Look for the result of the ./configure script and check that Xft has been properly detected :
....
checking for XftDefaultHasRender in -lXft... yes
checking for X11/Xft/Xft.h... yes
....
If any of the two checks fails, Xft will be disabled. In this case, take a close look at the file config.log to determine why the check failed (Xft.h not present, the Xft library is not installed, whatever)
Once properly configured, just do a make; make install (or make install-strip if you want to get smaller executables) and restart Xfce. You should new enjoy the nice antialiased fonts in window title, menus and icons.
Apart from xfwm (the window manager) and xfpager (the window pager), all applications that ship with Xfce are based on GTK+. Unfortunately, unlike Qt, GTK+ doesn't include Xft support and anti-aliased font won't be available.
The best tools as of today for Xft support in gtk+ applications is gdkxft :
gdkxft doesn't require patching gtk+ source, nor even recompiling neither gtk+ nor the applications. By using LD_PRELOAD, it overrides the routines in gdk so all gtk+ applications instantly benefit from anti-aliased fonts.
Some applications, like gkrellm do not work with gdkxft. In this case, simply unset LD_PRELOAD prior to launching gkrellm.
Gdkxft modifies XftConfig for you, but I found my handmade XftConfig file to be better than the one created by gdkxft script. No matter, I simply backed up my own XftConfig once gdkxft has finished its installation procedure.
Gdkxft uses its own configuration file. Make sure you check that configuration file if gdkxft doesn't give the espected results.
There are a couple of other patches to apply to the GTK+ source tree so it supports anti aliased fonts. Right now, I would not recommend using it because it makes GTK+ far less reliable that the original GTK+ distribution .
However, of you want to try it by yourself, you can get the patches from :
Q: I don't have RENDER listed in the the available extensions, what can I do ?
A: Try to upgrade to the latest XFree86 available. If you already have it installed on your system, try the CVS from Xfree86 web site ( http://www.xfree86.org )
Other than that, if RENDER is not supported by the driver for your video card, there's not much you can do.
Q: I've managed to get Xft working, compiled Xfce with Xft support, but now, any font I select from Xfce setup panel, I always get the same fonts in Xfwm.
A: You don't have listed all your font dirs in XftConfig so Xft can't map the requested font to the actual font.
Q: Why xfwm takes so long to start now ?
A: Because Xft will scan all the fonts that are listed in XftConfig. The more fonts you have, the longer it will take to start an application that uses Xft.
Q: Why Xft is not compiled by default in Xfce ?
A: Because not everybody have or use XFree86 4.x, because it slow down xfwm startup and it makes window management somehow slower (this can be seen on smallest configurations)