fc-cat
Read font files, showing font information
SYNOPSIS
fc-cat [ -v | --verbose ] [ -e | --error ] [ --skip-deprecated ] [ file... ]
PARAMETERS
-v, --verbose
Displays the effective configuration with verbose output, including detailed parsing information and where each rule originated.
-e, --error
Prints error messages when parsing configuration files.
--skip-deprecated
Skips processing of deprecated configuration elements.
file...
One or more Fontconfig XML configuration files to process. If no files are specified, fc-cat processes the default system configuration.
DESCRIPTION
fc-cat is a utility from the Fontconfig library designed to process and display the effective font configuration. It reads Fontconfig XML configuration files, typically fonts.conf or user-specific files, and concatenates their content, resolving includes and applying rules, before printing the resulting configuration to standard output. This tool is invaluable for debugging and understanding how Fontconfig resolves font paths, aliases, and preferences across the system and user directories. It helps administrators and developers to verify the cumulative configuration derived from multiple font configuration files, which can be distributed across various locations like /etc/fonts/conf.d/ and user's ~/.config/fontconfig/fonts.conf. By examining its output, one can identify issues with font rendering, missing fonts, or incorrect font matching rules. Unlike simply concatenating XML files, fc-cat performs the actual Fontconfig parsing logic, including conditional processing and variable expansion, providing a true representation of the active configuration.
CAVEATS
The output of fc-cat can be very verbose and complex, especially for large font configurations, making it challenging to parse manually. It's primarily a diagnostic tool for understanding Fontconfig's internal parsing logic rather than a general-purpose XML viewer. Users need to be familiar with Fontconfig's XML schema to fully interpret the output.
PURPOSE
The primary purpose of fc-cat is to demonstrate how Fontconfig parses and consolidates multiple configuration files into a single, effective configuration. This is crucial because Fontconfig often combines system-wide settings, application-specific overrides, and user preferences to determine the final font rendering behavior. fc-cat effectively shows this merged view.
HISTORY
fc-cat is an integral part of the Fontconfig library, which was developed by Keith Packard and released in 2000. Fontconfig provides system-wide font configuration, customization, and application access. As a utility for debugging and understanding this complex configuration system, fc-cat has been present since early versions of Fontconfig. Its purpose remains consistent: to reveal the complete, active font configuration as interpreted by the Fontconfig library, aiding in troubleshooting font-related issues in Linux and other Unix-like environments.