Fontconfig

Last updated
Original author(s) Keith Packard
Initial release18 December 2000;23 years ago (2000-12-18) [1] [2]
Stable release
2.15.0 [3]   OOjs UI icon edit-ltr-progressive.svg / 22 December 2023;3 months ago (22 December 2023)
Preview release
2.13.96 [4]   OOjs UI icon edit-ltr-progressive.svg / 4 February 2022;2 years ago (4 February 2022)
Repository
Written in C
Operating system Unix-like systems
Type Font handling library
License MIT [5]
Website fontconfig.org

Fontconfig (or fontconfig) is a free software [6] 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. [7]

Contents

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. [8] 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. [9]

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:

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

Utilities

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

See also

Related Research Articles

<span class="mw-page-title-main">XFree86</span> Implementation of the X Window System

XFree86 is an implementation of the X Window System. It was originally written for Unix-like operating systems on IBM PC compatibles and was available for many other operating systems and platforms. It is free and open source software under the XFree86 License version 1.1. It was developed by the XFree86 Project, Inc. The lead developer was David Dawes. The last released version was 4.8.0, released December 2008. The last XFree86 CVS commit was made on May 18, 2009; the project was confirmed dormant in December 2011.

<span class="mw-page-title-main">APT (software)</span> Free software package management system

Advanced package tool, or APT, is a free-software user interface that works with core libraries to handle the installation and removal of software on Debian and Debian-based Linux distributions. APT simplifies the process of managing software on Unix-like computer systems by automating the retrieval, configuration and installation of software packages, either from precompiled files or by compiling source code.

<span class="mw-page-title-main">Portage (software)</span> Gentoo package management system

Portage is a package management system originally created for and used by Gentoo Linux and also by ChromeOS, Calculate, Sabayon, and Funtoo Linux among others. Portage is based on the concept of ports collections. Gentoo is sometimes referred to as a meta-distribution due to the extreme flexibility of Portage, which makes it operating-system-independent. The Gentoo/Alt project was concerned with using Portage to manage other operating systems, such as BSDs, macOS and Solaris. The most notable of these implementations is the Gentoo/FreeBSD project.

freedesktop.org (fd.o), formerly X Desktop Group (XDG), is a project to work on interoperability and shared base technology for free-software desktop environments for the X Window System (X11) and Wayland on Linux and other Unix-like operating systems. Although freedesktop.org produces specifications for interoperability, it is not a formal standards body.

<span class="mw-page-title-main">Configuration file</span> Software file used to configure the initial settings for a computer program

In computing, configuration files are files used to configure the parameters and initial settings for some computer programs or applications, server processes and operating system settings.

X.Org Server is the free and open-source implementation of the X Window System (X11) display server stewarded by the X.Org Foundation.

chroot is an operation on Unix and Unix-like operating systems that changes the apparent root directory for the current running process and its children. A program that is run in such a modified environment cannot name files outside the designated directory tree. The term "chroot" may refer to the chroot(2) system call or the chroot(8) wrapper program. The modified environment is called a chroot jail.

CONFIG.SYS is the primary configuration file for the DOS and OS/2 operating systems. It is a special ASCII text file that contains user-accessible setup or configuration directives evaluated by the operating system's DOS BIOS during boot. CONFIG.SYS was introduced with DOS 2.0.

<span class="mw-page-title-main">Windows Registry</span> Database for Microsoft Windows

The Windows Registry is a hierarchical database that stores low-level settings for the Microsoft Windows operating system and for applications that opt to use the registry. The kernel, device drivers, services, Security Accounts Manager, and user interfaces can all use the registry. The registry also allows access to counters for profiling system performance.

The configuration file XF86Config of the XFree86 project is used by the X server to set necessary configuration parameters.

An INI file is a configuration file for computer software that consists of a text-based content with a structure and syntax comprising key–value pairs for properties, and sections that organize the properties. The name of these configuration files comes from the filename extension INI, for initialization, used in the MS-DOS operating system which popularized this method of software configuration. The format has become an informal standard in many contexts of configuration, but many applications on other operating systems use different file name extensions, such as conf and cfg.

<span class="mw-page-title-main">NetworkManager</span> Software

NetworkManager is a daemon that sits on top of libudev and other Linux kernel interfaces and provides a high-level interface for the configuration of the network interfaces.

In computing, a hidden folder or hidden file is a folder or file which filesystem utilities do not display by default when showing a directory listing. They are commonly used for storing user preferences or preserving the state of a utility and are frequently created implicitly by using various utilities. They are not a security mechanism because access is not restricted – usually the intent is simply to not "clutter" the display of the contents of a directory listing with files the user did not directly create.

awesome (window manager) Window manager for X Window System

awesome is a dynamic window manager for the X Window System developed in the C and Lua programming languages. Lua is also used for configuring and extending the window manager. Its development began as a fork of dwm, though has differed considerably since. It aims to be extremely small and fast, yet extensively customizable. It makes it possible for the user to manage windows with the use of keyboard.

AppStream is an agreement between major Linux vendors to create an infrastructure for application installers on Linux and sharing of metadata.

<span class="mw-page-title-main">XML transformation language</span> Type of programming language

An XML transformation language is a programming language designed specifically to transform an input XML document into an output document which satisfies some specific goal.

ranger (file manager) Text-based file manager

ranger is a free and open-source file manager with text-based user interface for Unix-like systems. It is developed by Roman Zimbelmann and licensed under the terms of the GNU General Public License. The program can accomplish file management tasks with a few keystrokes, and mouse input is optional. In conjunction with extensions including the rifle file opener and scope.sh, ranger can be scripted to open files with pre-defined programs, and to display a preview of the selected file by calling external programs.

<span class="mw-page-title-main">Flatpak</span> Linux software deployment utility

Flatpak is a utility for software deployment and package management for Linux. It is advertised as offering a sandbox environment in which users can run application software in isolation from the rest of the system. Flatpak, in 2016, was known as xdg-app.

<span class="mw-page-title-main">Meson (software)</span> Build automation system

Meson is a software tool for automating the building (compiling) of software. Meson is free and open-source software written in Python, under the Apache License 2.0.

Tailwind CSS is an open source CSS framework. The main feature of this library is that, unlike other CSS frameworks like Bootstrap, it does not provide a series of predefined classes for elements such as buttons or tables. Instead, it creates a list of "utility" CSS classes that can be used to style each element by mixing and matching.

References

  1. "About Fontconfig". www.freedesktop.org. Retrieved 2024-02-28.
  2. "Documentation for XFree86[tm] version 4.0.2". xfree86.org. Retrieved 2024-02-28.
  3. "2.15.0 · Tags · fontconfig".
  4. "Release 2.13.96".
  5. "COPYING · master · fontconfig / Fontconfig". Archived from the original on 2021-04-15. Retrieved 2018-09-25.
  6. "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...
  7. "[Fontconfig] Fontconfig 2.7.0 released". freedesktop.org. 24 June 2009.
  8. "State of Text Rendering". behdad.org.
  9. "GIMP - Fonts in GIMP". Font configuration is handled by a small library called Fontconfig.