LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

fc-scan

scan font files and directories

TLDR

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

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
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

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

RESOURCES

Copied to clipboard
Kai