LinuxCommandLibrary

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.

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)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community