fc-match
find best matching font
TLDR
Find best matching font
$ fc-match [pattern]
Match monospace font$ fc-match monospace
Match with specific family$ fc-match "DejaVu Sans"
Show verbose output$ fc-match -v [pattern]
Show specific elements$ fc-match --format "%{family}\n" [pattern]
Match all fonts$ fc-match -a [pattern]
SYNOPSIS
fc-match [options] [pattern]
DESCRIPTION
fc-match matches fonts against fontconfig patterns and shows which font will be used for a given request. The tool is essential for debugging font configuration, understanding why certain fonts are selected, and verifying font substitution rules.When applications request a font, fontconfig uses a sophisticated matching algorithm considering family name, style, weight, and other properties. fc-match reveals the result of this matching process, helping diagnose font-related issues.
PARAMETERS
-a, --all
Show all matching fonts.-s, --sort
Sort output by priority.-v, --verbose
Verbose output.--format format
Format output string.
INSTALL
sudo apt install fontconfig
sudo dnf install fontconfig
sudo pacman -S fontconfig
sudo apk add fontconfig
sudo zypper install fontconfig
brew install fontconfig
nix profile install nixpkgs#fontconfig
CAVEATS
Pattern syntax can be complex. Font matching rules depend on fontconfig configuration. Results may differ across systems with different font installations.
SEE ALSO
fc-list(1), fc-cache(1), fc-pattern(1), fc-query(1)
