fc-scan

scan font files and directories

TLDR

Scan directory for fonts
$ fc-scan [/usr/share/fonts]
Scan single font
$ fc-scan [font.ttf]
Output specific format
$ fc-scan --format '%{family}: %{file}\n' [directory]

SYNOPSIS

fc-scan [options] files...

DESCRIPTION

fc-scan scans font files and directories, displaying font information in fontconfig format. Unlike fc-query which examines single files, fc-scan can process directories and multiple files.The tool outputs font patterns that fontconfig uses for font matching. Custom format strings extract specific properties. When given a directory, it scans the entire tree recursively.fc-scan is useful for inventorying fonts, finding duplicates, or generating font lists for documentation.

PARAMETERS

FILES

Font files or directories to scan. Directories are scanned recursively.
-f, --format FORMAT
Output format string.
-V, --version
Show the program version and exit.
-h, --help
Display help information.

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

Does not update system font cache. Large directories may take time. Format string syntax can be complex.

HISTORY

fc-scan is part of fontconfig, providing batch font scanning capabilities. It complements fc-query for examining fonts without affecting the system font configuration.

SEE ALSO

fc-query(1), fc-list(1), fc-cache(1)

RESOURCES

Source code · Homepage