LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

fc-match

find best matching font

TLDR

Find best matching font
$ fc-match [pattern]
copy
Match monospace font
$ fc-match monospace
copy
Match with specific family
$ fc-match "DejaVu Sans"
copy
Show verbose output
$ fc-match -v [pattern]
copy
Show specific elements
$ fc-match --format "%{family}\n" [pattern]
copy
Match all fonts
$ fc-match -a [pattern]
copy

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
copy
sudo dnf install fontconfig
copy
sudo pacman -S fontconfig
copy
sudo apk add fontconfig
copy
sudo zypper install fontconfig
copy
brew install fontconfig
copy
nix profile install nixpkgs#fontconfig
copy

CAVEATS

Pattern syntax can be complex. Font matching rules depend on fontconfig configuration. Results may differ across systems with different font installations.

SEE ALSO

RESOURCES

Copied to clipboard
Kai