fc-match
Find best matching font for a pattern
TLDR
Return a sorted list of best matching fonts
SYNOPSIS
fc-match [-sV] [-c | --config config-file] [-v | --verbose] [-f | --format format] [pattern ...]
PARAMETERS
-s
Obsolete option to print the score of the matched font. This option is now ignored.
-c, --config config-file
Use the specified Fontconfig configuration file instead of the default system configuration.
-v, --verbose
Display verbose output of the matching process, including all fonts considered and their match qualities.
-f, --format format
Format the output according to the given Fontconfig pattern format specifier, as described in the Fontconfig manual.
-V, --version
Show the program's version information and exit.
-h, --help
Display a summary of available command-line options.
pattern
The font pattern to match. If no pattern is supplied, the default font pattern is used.
DESCRIPTION
fc-match is a utility that
matches a given font pattern against the fonts available on the system. It then prints the
best-matching font from the system's font cache. If no specific pattern is provided, it uses a
default pattern to find a font. The command is primarily used for debugging Fontconfig
configurations and understanding how patterns are resolved to actual fonts. When used with the
--verbose option, it provides detailed output, listing all fonts considered during the
matching process along with their respective match qualities, helping to diagnose font
selection issues. It's an essential tool for developers and system administrators working with
font rendering on Linux systems.
CAVEATS
The -s option, although present in the synopsis, is obsolete and is now ignored by fc-match.
RETURN CODES
fc-match returns 0 if a match is successfully found, and 1 if no matching font could be located.
BUGS
Bug reports for Fontconfig, including issues with fc-match, should be filed against the "fontconfig" product in the freedesktop.org bugzilla.