The Full Wiki

Fontconfig: Wikis


Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.


From Wikipedia, the free encyclopedia

Developer(s) Keith Packard
Stable release 2.8.0 / 2009-11-18; 59 days ago
Operating system Unix-like systems
Type Font handling library

Fontconfig (the name is spelled in both capitalized and uncapitalized form) is a computer program library designed to provide system-wide font configuration, customization, and application access. Fontconfig is written and was originally maintained by Keith Packard. Its current maintainer is Behdad Esfahbod.[1]

Fontconfig is distributed under a permissive free software licence, and is thus free software.[2]

Applications can use fontconfig in two ways:

  1. by querying it for the available fonts on the system or
  2. by asking it for a font matching certain parameters (pattern). Fontconfig will then return a font whose properties match those specified in the pattern as closely as possible.

To perform font matching, fontconfig stores a lot of typesetting information about all of the installed fonts, such as the name of the font family, style, weight, DPI, Unicode coverage etc. This information is also used to perform font substitution.



Fontconfig uses XML format for its configuration files. The DTD for fontconfig files is normally located at /etc/fonts/fonts.dtd.

Master configuration file is usually /etc/fonts/fonts.conf; it references a few other configuration locations which may or may not exist:

  • /etc/fonts/local.conf
  • /etc/fonts/conf.d directory
  • ~/.fonts.conf

A simple example of a configuration file:

 <?xml version="1.0"?>
 <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
   <!-- Enable antialiasing for all fonts -->
   <match target="font">
     <edit mode="assign" name="antialias"><bool>true</bool></edit>

See the fontconfig manual for details.


fontconfig ships with four command line utilities to manage the font configuration:

  • fc-list: Lists all fonts fontconfig knows about or all fonts matching a pattern.
  • fc-cache: Creates a cache of all FreeType readable fonts in a specified directory or create a cache of all FreeType readable fonts from all directories specified in Configuration files.
  • fc-cat: reads the font information from cache files or related to font directories and emits it in ASCII form.
  • fc-match: matches font-pattern (empty pattern by default) using the normal fontconfig matching rules to find the best font available.

Fontconfig depends on FreeType, a font renderer, and expat, an XML parser library, both are free software.

Fontconfig is commonly used under GNU and Unix-like systems for querying and listing installed fonts and their properties. It is used by toolkits like GTK+ and Qt, document preparation systems like XeTeX (which uses it under MS Windows too), font managers like Fontmatrix, and other applications like Mozilla Firefox.

Versioning scheme

fontconfig uses a versioning scheme in which values of 90 or above in the last number indicate prerelease versions.

See also


  1. ^
  2. ^ "fontconfig-2.6.0.tar.gz (see file "COPYING")". "Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Keith Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission..."  

External links



Got something to say? Make a comment.
Your name
Your email address