Fontconfig Explained

Fontconfig
Author:Keith Packard
Released:[1] [2]
Programming Language:C
Operating System:Unix-like systems
Genre:Font handling library
License:MIT[3]

Fontconfig (or fontconfig) is a free software[4] program library designed to provide configuration, enumeration and substitution of fonts to other programs. Fontconfig was originally written and maintained by Keith Packard, and is currently maintained by Behdad Esfahbod.[5]

Fontconfig is typically used on graphical Linux (and other Unix-like) desktops, such as Xorg and Wayland, where it remains an important part of handling fonts.[6] However, it is also sometimes used on other platforms, notably including Windows versions of software that use Pango for laying out and rendering text, such as GIMP.[7]

Usage

End-users can use fontconfig, directly or indirectly, to customize and configure fonts on the system.

Applications can use fontconfig in two ways:

  1. by querying it for the available fonts on the system, or
  2. by querying it for a font matching certain parameters (comprising a pattern) as closely as possible.

To perform font matching, fontconfig stores typesetting information about all of the installed fonts, including the name of the font family, style, weight, dots per inch (DPI), and Unicode coverage. This information is also used to perform font substitution.

Configuration

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

The master configuration file - usually /etc/fonts/fonts.conf - references a few other configuration locations which may or may not exist:

A simple example of a configuration file:

true config>

Utilities

Fontconfig ships with eight command line utilities to manage and query fonts and the font configuration of the system:

See also

External links

Notes and References

  1. Web site: About Fontconfig . 2024-02-28 . www.freedesktop.org.
  2. Web site: Documentation for XFree86[tm] version 4.0.2 ]. 2024-02-28 . xfree86.org.
  3. Web site: COPYING · master · fontconfig / Fontconfig. 2018-09-25. 2021-04-15. https://web.archive.org/web/20210415144933/https://gitlab.freedesktop.org/fontconfig/fontconfig/blob/master/COPYING. dead.
  4. Web site: 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 distrkeithp.comibution of the software without specific, written prior permission....
  5. Web site: [Fontconfig] Fontconfig 2.7.0 released ]. freedesktop.org. 24 June 2009 .
  6. Web site: State of Text Rendering. behdad.org.
  7. Web site: GIMP - Fonts in GIMP . Font configuration is handled by a small library called Fontconfig..