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.

Generic
fontconfig uses XML files in directory to generate its internal configuration. By default it parses (users should not edit this file!) which sets some sane defaults and usually contains code to also parse  content. In addition there is directory that contains various possible configuration files that each cover some aspect of fontconfig. It's customary to symlink necessary files to. 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 by adding or removing them from the  directory. For obvious reasons changing system wide configuration requires appropriate permissions.

Enabling a file
Files can be enabled either by filename or by the number in brackets. These two do the same thing:

Disabling a file
Files can be disabled likewise:

Custom system wide configuration
Enable and create  (this is an XML file, you have been warned). TODO put an example of that horror

Per-user configuration
Enable (possibly enabled by default). And use (same format as )

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 but the only way to be sure is to either consult display specification 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 should be appropriate for all common fonts.