HOME

TheInfoList



OR:

Fontconfig (or fontconfig) is a
free software Free software, libre software, libreware sometimes known as freedom-respecting software is computer software distributed open-source license, under terms that allow users to run the software for any purpose as well as to study, change, distribut ...
program library designed to provide configuration, enumeration and substitution of
fonts In movable type, metal typesetting, a font is a particular #Characteristics, size, weight and style of a ''typeface'', defined as the set of fonts that share an overall design. For instance, the typeface Bauer Bodoni (shown in the figure) inclu ...
to other programs. Fontconfig was originally written and maintained by Keith Packard, and is currently maintained by Behdad Esfahbod. Fontconfig is typically used on graphical
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
(and other
Unix-like A Unix-like (sometimes referred to as UN*X, *nix 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 Uni ...
) desktops, such as Xorg 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 Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
versions of software that use Pango for laying out and rendering text, such as
GIMP Gimp or GIMP may refer to: Clothing * Bondage suit, also called a gimp suit, a type of suit used in BDSM * Bondage mask, also called a gimp mask, often worn in conjunction with a gimp suit Embroidery and crafts * Gimp (thread), an ornamental tr ...
.


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 administrato ...
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 a design of letters, numbers and other symbols, to be used in printing or for electronic display. Most typefaces include variations in size (e.g., 24 point), weight (e.g., light, bold), slope (e.g., italic), width ...
,
style Style, or styles may refer to: Film and television * ''Style'' (2001 film), a Hindi film starring Sharman Joshi, Riya Sen, Sahil Khan and Shilpi Mudgal * ''Style'' (2002 film), a Tamil drama film * ''Style'' (2004 film), a Burmese film * '' ...
,
weight In science and engineering, the weight of an object is a quantity associated with the gravitational force exerted on the object by other objects in its environment, although there is some variation and debate as to the exact definition. Some sta ...
,
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 or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
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 ...
.


Configuration

Fontconfig uses
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
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: * /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: Science and technology * Cache (computing), a technique used in computer storage for easier data access * Cache (biology) or hoarding, a food storing behavior of animals * Cache (archaeology), artifacts p ...
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 A configuration file, a.k.a. config file, is a file that stores data used to configure a software system such as an application, a server or an operating system. Some applications provide a tool to create, modify, and verify the syntax of the ...
. * fc-cat: Reads the font information from cache files or related to font directories and emits it in
ASCII ASCII ( ), an acronym for American Standard Code for Information Interchange, is a character encoding standard for representing a particular set of 95 (English language focused) printable character, printable and 33 control character, control c ...
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 Technical standard, standard used by the X Window System and first published in 1988.X logical font description#Flowers, Jim Flowers; Stephen Gildea (1994). "X Logical Font Description Conventions" Mod ...
* Xft


References


External links


fontconfig website



Font Configuration and Customization for Open Source Systems (PDF)
{{Freedesktop.org Free software programmed in C Freedesktop.org libraries Unix software Software using the MIT license