This document is very very very out of date, and is at this point of only historical interest. For actually useful information about fonts in Debian, have a look here.

A very short guide to setting up fonts for X in Debian. It assumes XFree86 4.1 or more recent, and explains how to setup fontconfig and Xft1.

  1. Install x-ttcidfont-conf and defoma
  2. Add a line like this to /etc/X11/XF86Config-4, in the “Files” section:

     FontPath        "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"

    Adding it at the top of the list is probably a good idea. This line will setup XFree86 to use any TrueType fonts you install from Debian packages. If you install a new set of TrueType fonts while in X, run xset fp rehash to get XFree86 to look at the contents of that directory again and to pickup new ones.

  3. Move this line to the bottom of the list of FontPaths:

     FontPath        "/usr/lib/X11/fonts/Type1"

    XFree86 does a rather poor job of rendering Type1 fonts these days, and if this is above your better looking fonts, you can get a some pretty ugly results.

  4. Add :unscaled to the end of the 100dpi and 75dpi font lines, so they look like this:

     FontPath        "/usr/lib/X11/fonts/100dpi:unscaled"
     FontPath        "/usr/lib/X11/fonts/75dpi:unscaled"

    Without the “:unscaled” bit, XFree86 will try to scale these bitmap fonts up and down, which usually looks rather horrible.

And, after all that, my Files section looks like this:

Section "Files"
        FontPath        "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
        FontPath        "/usr/share/fonts/truetype"
        FontPath        "/usr/lib/X11/fonts/CID"
        FontPath        "/usr/lib/X11/fonts/Speedo"
        FontPath        "/usr/lib/X11/fonts/misc"
        FontPath        "/usr/lib/X11/fonts/cyrillic"
        FontPath        "/usr/lib/X11/fonts/100dpi:unscaled"
        FontPath        "/usr/lib/X11/fonts/75dpi:unscaled"
        FontPath        "/usr/lib/X11/fonts/Type1"

Now that it’s all setup, install some font packages. ttf-bitstream-vera is a rather nice set of fonts, and is [Free] ( enough to go into Debian itself. It’s not in woody yet, but you can download the .deb from here (or your local mirror) and install it with:

dpkg -i ttf-bitstream-vera_1.10-3_all.deb

(as root). sid and sarge users are just an apt-get install ttf-bitstream-vera away from it. Another option is ttf-freefont, which is in all three current versions of Debian.

For Japanese and other non-roman languages, you might want to try these fonts: tfm-arphic-bsmi00lp, tfm-arphic-bkai00mp, tfm-arphic-gbsn00lp, tfm-arphic-gkai00mp, hbf-jfs56, hbf-cns40-b5, hbf-kanji48, ttf-baekmuk and ttf-thryomanes.

Another alternative is to install Microsoft’s Corefonts. They removed the fonts from their website, but the msttcorefonts package will download them for you from a mirror. Note that these are NOT Free (in the Debian sense), but you’re permitted to at least use and download them.

Both of these packages (and the other ttf-* packages in Debian) should now Just Work, and appear available to all X programs that use the regular “core” font system. This includes things like xterm, emacs and most other non-KDE and non-GNOME applications.

Now, run xfontsel and select either “Microsoft” or “Bitstream” in the fndry menu (click on the word “fndry”). Now look at the ungrayed out entries in the “fmly” menu. You should have a bunch of either Microsoft fonts (Verdana, Trebuchet, etc) or some Bitstream ones (or both).

For KDE2.2 and GNOME1.4 (with libgdkxft0, which is a hack to get GTK 1.2 to do anti-aliased font rendering), you need to setup Xft1, as well. Xft1 is highly deprecated, and is basically only used by GNOME1.4 and KDE2.2. For GNOME2 and KDE3, you need to setup fontconfig which Xft2 uses to find fonts. I’ll get to that in a minute.

Edit /etc/X11/XftConfig and add a line like:

    dir "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"

before the other dir lines. I don’t have any xft1 stuff on my machine anymore, so I’m not sure if you need to restart X or not before this change will take effect. I seem to remember that xftcache would update the Xft1 cache, but it’d be good if someone could confirm that for me.

Now, for fontconfig, which does not exist in woody. You shouldn’t need to install anything extra for this, since all the packages using fontconfig will Depend on it (indirectly) already. First, look in /etc/fonts/fonts.conf. There should be a line like the one below. If not, open up /etc/fonts/local.conf and add this:


just after the <fontconfig> line.

Fontconfig should pick these up immediately, and fc-list should list your new fonts. Another neat feature of fontconfig is that you can just drop fonts in ~/.fonts/ and all your fontconfigified programs will have access to them immediately.