[1]Publications / Anti-Aliased Font Tips And Tricks For OPENBSD * [2]Home * [3]Publications * [4]Projects * [5]Presentations * [6]In The News * [7]Speaking Schedule Aliased Font Tips And Tricks For OPENBSD [this article is obsolete] I believe this topic seems to cause a lot of confusion, so better I'm passing on what I know as I have been getting a good result with font rendering on my system ( OpenBSD /i386 3.1-current). After reading the OpenBSD FAQ page about Antialiasing and TrueType Fonts[1], one could be forgiven for thinking that it's a lot harder that it actually is. I decided I will not delve so deeply into following topics (you might find there are many resources already): generating scale files for font directories, installing TrueType fonts collections, etc I will just concentrate on how to configure Xft to anti-alias your chosen fontsets, and then optimise them for a good appearance on your screen. First of all, a glossary should provide a good starting point. Freetype The FreeType engine is a free and portable TrueType font rendering engine. It has been developed to provide TT support to a great variety of platforms and environments. To display truetype fonts, Load "freetype" should be present in your XF86Config file. XF86Config XFree86 uses a configuration file called XF86Config for its initial setup. This configuration file is searched for in the following places when the server is started as a normal user: /etc/X11/ /usr/ X11R6 /etc/X11/ /etc/X11/$XF86CONFIG /usr/ X11R6 /etc/X11/$XF86CONFIG /etc/ X11/XF86Config -4 /etc/ X11/XF86Config /etc/ XF86Config /usr/ X11R6 /etc/ X11/XF86Config . /usr/ X11R6 /etc/ X11/XF86Config -4 /usr/ X11R6 /etc/ X11/XF86Config /usr/ X11R6 /lib/ X11/XF86Config . /usr/ X11R6 /lib/ X11/XF86Config -4 /usr/ X11R6 /lib/ X11/XF86Config where is a relative path (with no ".." components) specified with the -xf86config command line option, $XF86CONFIG is the relative path (with no ".." components) specified by that environment variable, and is the machine's hostname as reported by gethostname(3). Xft Xft is a simple library designed to interface the FreeType rasterizer with the X Rendering Extension. It's Keith Packard[2]'s contribution to the XFree86 4.x series. It is built from Freetype2 code which is distributed with X. The library is known as libXft.so. Xft is capable of rendering antialiased fonts, but configuration is required. xfs xfs is the X Window System font server. It supplies fonts to X Window System display servers. It is a stand-alone font rendering system which X uses via a TCP socket. Since OpenBSD has xft, it isn't really needed now unless you want X server to use a font server on a different machine. xfs is not used by default. OpenBSD has almost all the requirements for doing Anti-Aliasing. For detailed information about requirements and tips, you can read the FAQ[1]. In practice, some modifications to the default XFree86 installation on a OpenBSD system are needed. * The Xft configuration file (/etc/X11/Xftconfig) will need to have the fontpaths specified. * Specify the pixel/font size range for X to do anti-aliasing so X doesn't gratuitously anti-alias all the time. That's why some people complain that fonts looks so fuzzy. It doesn't have to be that way. The only thing i did was to edit the Xft configuration file to add these modifications. match any size > 8 any size < 14 edit antialias = false; which means that the fonts in range 8pt and 14pt will not get anti-aliased. It's not necessary to anti-alias the normal fontsizes. match any pixelsize > 8 any pixelsize < 14 edit antialias = false; this mean the same, but is enforced for KDE. All you need is to reboot X and the fonts should look better. But if you still find that the font size is not the same as the pixel size, you can try this match any size > 8 any size < 15 edit antialias = false; match any size > 10 all weight == bold edit antialias = true; match any pixelsize > 8 any pixelsize < 18 edit antialias = false; You can also perform specific font treatment: # Verdana shoud be anti-aliased at 17pts match any family == "Verdana" any pixelsize = 17 edit antialias = false; # Bold fonts match any pixelsize > 15 all weight == bold; edit antialias = true; # Times New Roman Italic doesn't look good anti-aliased at larger sizes match any family == "Times New Roman" all slant == italic any pixelsize > 15 any pixelsize < 20 edit antialias = false; You can get more detailed information about font configuration and Xft in Keith Packard's website[3]. For KDE users, KDE supports anti-aliasing as of 2.x. You will require QT-2.3.0 or later, and it must be built with Xft support. GNOME does not support anti-aliasing at this time; apparently it will be available in GNOME 2, and will have native support for anti-aliasing. References: 1. OpenBSD FAQ, Antialiasing and TrueType Fonts on OpenBSD 2.9 or later, [8]http://openbsd.org/faq/truetype.html 2. Keith Packard, personal website, [9]http://keithp.com/~keithp/ 3. Keith Packard, Fontconfig and Xft, [10]http://keithp.com/fonts/ Copyright © 2004-2006. Jim Geovedi <[11]jim@geovedi.com> Page last modified on January 11, 2006, at 06:03 PM References 1. http://jim.geovedi.com/Publications 2. http://jim.geovedi.com/Main/HomePage 3. http://jim.geovedi.com/Publications/HomePage 4. http://jim.geovedi.com/Projects/HomePage 5. http://jim.geovedi.com/Presentations/HomePage 6. http://jim.geovedi.com/News/HomePage 7. http://jim.geovedi.com/SpeakingSchedule/HomePage 8. http://openbsd.org/faq/truetype.html 9. http://keithp.com/~keithp/ 10. http://keithp.com/fonts/ 11. mailto:jim@geovedi.com