Don't you hate it when you're given a document with characters that don't display correctly, or come across a website that has words and letters replaced by strange symbols or ?s? This guide will show you how to properly add fonts to your system so that you can see the text as it was meant to be.
Since we want to be able to use fonts that are not included in a default
installation of Xorg-X11, we need to emerge it with certain USE flags enabled:
bitmap-fonts, truetype-fonts, and type1-fonts. You can
place these flags in
USE="bitmap-fonts truetype-fonts type1-fonts"
Or, if you prefer to set these USE flags just for the Xorg-X11 package, do this:
# echo "x11-base/xorg-x11 bitmap-fonts truetype-fonts type1-fonts" >> /etc/portage/package.use
Next, we emerge Xorg-X11.
# emerge xorg-x11
This will take some time, so go find something to occupy your mind. Once
Xorg-X11 is properly installed and initially configured (see
By default, X11 stores all fonts in
$ ls /usr/share/fonts
Next, let's look at
Section "Files" RgbPath "/usr/lib/X11/rgb" ModulePath "/usr/lib/modules" FontPath "/usr/share/fonts/misc/" FontPath "/usr/share/fonts/TTF/" FontPath "/usr/share/fonts/Type1/" FontPath "/usr/share/fonts/CID/" FontPath "/usr/share/fonts/75dpi/" FontPath "/usr/share/fonts/100dpi/" FontPath "/usr/share/fonts/cyrillic/" FontPath "/usr/share/fonts/intlfonts/" FontPath "/usr/share/fonts/kochi-substitute/" EndSection
You can specify new font paths in the "Files" section. As we will soon see, this is often necessary when you have installed a new font package.
Let's look at some of these directories in more detail.
One of the most common font packages Gentoo users will need (or want) is corefonts. This package contains many of the standard TrueType fonts that are part of Microsoft Windows, including Arial, Verdana, Times New Roman, Courier New, and Helvetica. These fonts are commonly used on many websites, as well. A few years ago, Microsoft made these fonts available to the public. The open source community quickly added these fonts to their package repositories, and just in time, too: shortly after making them available, Microsoft rethought their decision and removed the download from their pages. Now, corefonts is only available in Windows or in the package repositories for the various flavors of *nix and other operating systems. However, it is still legally freely distributable, so let's emerge it.
# emerge corefonts
corefonts is one of the few font packages that needs no additional
configuration in
Next, let's add international font packages, so that our web browsers can correctly display the various characters for pages that contain them. We'll emerge Japanese fonts and some European fonts.
# emerge intlfonts kochi-substitute
Now that we've installed the fonts, we need to edit
FontPath "/usr/share/fonts/ukr/" FontPath "/usr/share/fonts/cyrillic/" FontPath "/usr/share/fonts/intlfonts/" FontPath "/usr/share/fonts/kochi-substitute/"
Sometimes there aren't any font packages in the Portage repository, or you might have some fonts from an operating system on another partition that you'd like to use, or you've discovered a fantastic new font freely available on a website. Let's take a look at some of the ways you can manually add these fonts.
If you have a TrueType font (.ttf), you can move it to
Once you've added fonts to a home directory, you may need to restart the X server and rebuild its font cache in order to use them:
# fc-cache -fv # /etc/init.d/xdm restart
This is a stub paragraph. The rest will be up before too long. I will talk about what is antialiasing, and how to enable it in local.conf.
This is a stub paragraph. The rest will be up before too long. I will talk about what is hinting, and how to enable it and tweak it, especially for LCD users.
Now that you've finished setting up your system with many more useful fonts, go
explore Portage to see all the other pretty fonts you can use to make your
desktop a little bit nicer. A list of custom fonts can be found in