Chapter 11.  Pango, Xft, Fontconfig, and Render: Fonts the New Way

Client-Side Fonts

Since 2000, font handling has moved from the server to the client, where it is powered by three components:

RENDER

An X server extension that enables rapid rendering of anti-aliased glyphs (character pictures)

Fontconfig

A library (and two utilities) for font configuration and matching

Xft or Pango

Libraries that provide high-quality client-side font rendering

Note that fontconfig and Xft/Pango both run on the client side; the server-side piece of the puzzle, RENDER, simply improves performance—if it is not present, Xft/Pango will draw text using core protocol requests (which is slower than using RENDER and also slower than using core fonts, but still fast enough on modern hardware to provide good user interface response).

Qt3 uses Xft, and GTK+-2 uses Pango for text display; most older toolkits use core fonts (Section 10.1). A modern desktop system, running a mixof GNOME and KDE applications, a Mozilla-based browser, and OpenOffice.org will be using the new rendering libraries almost exclusively for text display.

Adding and Removing Fonts Manually

In most configurations, fontconfig scans /usr/share/fonts, one or more of the font directories in /usr/share/X11/fonts/ and ~/.font when it is initialized at the time an application starts. Any changes to the fonts contained in those directories are detected automatically, so adding fonts is simply a matter of placing files into those directories, and removing ...

Get X Power Tools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.