Fontconfig

The fontconfig library is intended to provide uniform font selection and configuration amongst all GUI applications though it's common for various desktop environments to provide their own font overrides and configuration, still fontconfig is the underlying library even then.

Configuration
{Note|Changes to fontconfig files will reflect only in applications started after the change!}

Generic
fontconfig uses XML files in /etc/fonts/ directory to generate its internal configuration. By default it parses /etc/fonts/fonts.conf (users should not edit this file!) which sets some sane defaults and usually contains code to also parse /etc/fonts/conf.d/ content. In addition there is /etc/fonts/conf.avail/ directory that contains various possible configuration files that each cover some aspect of fontconfig. It's customary to symlink necessary files to /etc/fonts/conf.d/. These files are executed in order they are named, for this reason their names start with a two digit number with the first (tens`) indicating class, that is, what the file affects.

Gentoo specific way
Gentoo ships an eselect module (eselect fontconfig) that does exactly what was described in generic way - it manages symlinks of files in /etc/fonts/conf.avail/ by adding or removing them from the /etc/fonts/conf.d/ directory. For obvious reasons changing system wide configuration requires appropriate permissions.

Listing available files
eselect fontconfig list

Enabling a file
eselect fontconfig enable OR 

Disabling a file
eselect fontconfig disable OR 

Custom system wide configuration
Enable 51-local.conf and create /etc/fonts/local.conf (this is an XML file, you have been warned). TODO put an example of that horror

Per-user configuration
Enable 50-user.conf (possibly enabled by default). And use ~/.fonts.conf (same format as local.conf) {Note|This is one way how a desktop environment might try to affect font rendering hence it might be prudent to disable this to be sure that what's being shown is actually system wide configuration when customizing it. Disabling it also makes font rendering more uniform across user accounts}.

Anti-aliasing, hinting and sub-pixel rendering
Anti-aliasing is enabled by default and makes fonts less blocky. Hinting is an attempt to cope with the low pixel count per unit of area of current displays.Correct hinting makes characters more crisp but since font metrics aren't changed (and arguably should not change) affects how overall the rendered text looks like. Sub-pixel rendering uses the fact that LCD matrix has three primaries to effectively triple the resolution of text but can make characters appear not entirely black. To combat that lcdfilter is to be used with sub-pixel rendering (available for newer fontconfig) but it can blur the characters too much. In the end this entirely depends on person how they like their text.

Using sub-pixel rendering
It`s important to determine the sub-pixel layout of the LCD matrix. It`s usually RGB (10-sub-pixel-rgb.conf) but the only way to be sure is to either consult display spcification or use this |sub-pixel layout test to determine it. It`s strongly advised that lcdfilter, if available, is used with sub-pixel rendering. It comes in different varieties but the default (11-lcdfilter-default.conf) should be appropriate for all common fonts.