HOME

TheInfoList



OR:

Fontconfig (or fontconfig) is a
free software Free software or libre software is computer software distributed under terms that allow users to run the software for any purpose as well as to study, change, and distribute it and any adapted versions. Free software is a matter of liberty, no ...
program library In computer science, a library is a collection of non-volatile resources used by computer programs, often for software development. These may include configuration data, documentation, help data, message templates, pre-written code and subro ...
designed to provide configuration, enumeration and
substitution Substitution may refer to: Arts and media *Chord substitution, in music, swapping one chord for a related one within a chord progression * Substitution (poetry), a variation in poetic scansion * "Substitution" (song), a 2009 song by Silversun Pi ...
of
fonts In metal typesetting, a font is a particular size, weight and style of a typeface. Each font is a matched set of type, with a piece (a "sort") for each glyph. A typeface consists of a range of such fonts that shared an overall design. In mode ...
to other programs. Fontconfig was originally written and maintained by
Keith Packard Keith Packard (born April 16, 1963) is a software developer, best known for his work on the X Window System. Packard is responsible for many X extensions and technical papers on X. He has been heavily involved in the development of X since the l ...
, and is currently maintained by
Behdad Esfahbod Seyed Behdad Esfahbod MirHosseinZadeh Sarabi ( fa, سید بهداد اسفهبد میر حسین‌زاده سرابی; born September 27, 1982) is an Iranian-Canadian software engineer and free software developer. He was a software engineer ...
. Fontconfig is typically used on graphical
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which ...
(and other
Unix-like A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-li ...
) desktops, such as
Xorg X.Org Server is the free and open-source implementation of the X Window System display server stewarded by the X.Org Foundation. Implementations of the client-side X Window System protocol exist in the form of ''X11 libraries'', which serve a ...
and Wayland, where it remains an important part of handling fonts. However, it is also sometimes used on other platforms, notably including
Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
versions of software that use
Pango Pango (stylized as Παν語) is a text (i.e. glyph) layout engine library which works with the HarfBuzz shaping engine for displaying multi-language text. Full-function rendering of text and cross-platform support is achieved when Pango is us ...
for laying out and rendering text, such as
GIMP GIMP ( ; GNU Image Manipulation Program) is a free and open-source raster graphics editor used for image manipulation (retouching) and image editing, free-form drawing, transcoding between different image file formats, and more specialized task ...
.


Usage

End-user In product development, an end user (sometimes end-user) is a person who ultimately uses or is intended to ultimately use a product. The end user stands in contrast to users who support or maintain the product, such as sysops, system administrat ...
s can use fontconfig, directly or indirectly, to customize and configure fonts on the system. Applications can use fontconfig in two ways: # by querying it for the available fonts on the system, or # 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 A typeface (or font family) is the design of lettering that can include variations in size, weight (e.g. bold), slope (e.g. italic), width (e.g. condensed), and so on. Each of these variations of the typeface is a font. There are thousands o ...
,
style Style is a manner of doing or presenting things and may refer to: * Architectural style, the features that make a building or structure historically identifiable * Design, the process of creating something * Fashion, a prevailing mode of clothing ...
,
weight In science and engineering, the weight of an object is the force acting on the object due to gravity. Some standard textbooks define weight as a Euclidean vector, vector quantity, the gravitational force acting on the object. Others define weigh ...
,
dots per inch Dots per inch (DPI, or dpiThe acronym appears in sources as either "DPI" or lowercase "dpi". See "Print Resolution Understanding 4-bit depth – Xerox" (PDF). Xerox.com. September 2012.) is a measure of spatial printing, video or image scanner ...
(DPI), and
Unicode Unicode, formally The Unicode Standard,The formal version reference is is an information technology Technical standard, standard for the consistent character encoding, encoding, representation, and handling of Character (computing), text expre ...
coverage. This information is also used to perform
font substitution Font substitution is the process of using one typeface in place of another when the intended typeface either is not available or does not contain glyphs for the required characters. Font substitution can be aided by: * classifying fonts into ge ...
.


Configuration

Fontconfig uses
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. T ...
format for its configuration files. The
document type definition A document type definition (DTD) is a set of ''markup declarations'' that define a ''document type'' for an SGML-family markup language ( GML, SGML, XML, HTML). A DTD defines the valid building blocks of an XML document. It defines the document ...
(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: * /etc/fonts/fonts.conf * /etc/fonts/conf.d * $XDG_CONFIG_HOME/fontconfig/conf.d * $XDG_CONFIG_HOME/fontconfig/fonts.conf * ~/.fonts.conf.d * ~/.fonts.conf A simple example of a configuration file: true


Utilities

Fontconfig ships with eight command line utilities to manage and query fonts and the font configuration of the system: * fc-list: Lists all fonts fontconfig knows about or all fonts matching a pattern. * fc-match: Matches font-pattern (empty pattern by default) using the normal fontconfig matching rules to find the most appropriate font available. * fc-cache: Creates a
cache Cache, caching, or caché may refer to: Places United States * Cache, Idaho, an unincorporated community * Cache, Illinois, an unincorporated community * Cache, Oklahoma, a city in Comanche County * Cache, Utah, Cache County, Utah * Cache County ...
of all FreeType readable fonts in a specified directory or create a cache of all FreeType readable fonts from all directories specified in the
configuration files In computing, configuration files (commonly known simply as config files) are files used to configure the parameters and initial settings for some computer programs. They are used for user applications, server processes and operating system set ...
. * fc-cat: Reads the font information from cache files or related to font directories and emits it in
ASCII ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because of ...
form. * fc-query: Querys font files and reports resulting pattern(s). * fc-scan: Scans font files and directories and reports resulting pattern(s). * fc-pattern: Lists best font(s) matching the supplied pattern(s). * fc-validate: Validate font file(s) and reports the results.


See also

* FreeType *
X logical font description X logical font description (XLFD) is a font standard used by the X Window System. Modern X software typically relies on the newer Fontconfig system instead, but XLFDs are still supported in current X window implementations for compatibility with ...
*
Xft Xft, the X FreeType interface library, is a free computer program library written by Keith Packard. It uses the MIT/X license that The Open Group applied after the post X11R6.4 license restoration. It is designed to allow the FreeType font ...


References


External links


fontconfig website



Font Configuration and Customization for Open Source Systems (PDF)
{{Freedesktop.org Free software Freedesktop.org libraries Unix software