[jump to content]

x fonts

X11 font naming was quite obscure to me until I finally decided to look for some explanations.

Let's throw some light on X11 fonts.

On today X11 servers, there are actually two different font systems:

  • Original core protocol: fonts are stored on the X11 server and clients send text through the X11 connection.
  • XFT library: fonts are stored on client side, the client sends drawing primitives to the server.

See also this Guide to X11 Fonts.

Original core protocol

If you ever played with X resources, you probably have seen font names like:


This is the complete name of a specific monospaced font. You can use xfontsel to compose such a name and use it in your urxvt configuration for example.

Those names are listed in fonts.dir files, have a look at /usr/share/fonts/X11/misc on a Debian system.

However, more human friendly names are also defined, look at fonts.alias files, you will see names like 10x20 which can remind you of the default XTerm configuration.

Using the original core protocol, only X11 compatible fonts are usable, no TTF!

Seen here.

XFT library

The XFT library allows more flexible font manipulation because everything is done on the client side. It also adds support for more font formats like TTF. However, according to rxvt-unicode FAQ, it is slower than core protocol.

Font names are using the following format:


Where size is the font size in point, and name/value pairs define other properties. Look at Keith Packard's Xft Tutorial.

One useful example if points are not meaningful for you:


By the way, the modern point is a 72th of an inch, and it is converted to pixel size based on the resolution of your monitor (see xdpyinfo | grep resolution).