Reference

fc-cache(1)

build font information cache files

NAME

fc-cache - build font information cache files

SYNOPSIS

fc-cache [ -EfrsvVh ] [ --error-on-no-fonts ] [ --force ] [ --really-force ] [ -y dir | --sysroot dir ] [ --system-only ] [ --verbose ] [ --version ] [ --help ] [ dir ... ]

DESCRIPTION

fc-cache scans the font directories on the system and builds font information cache files for applications using fontconfig for their font handling.

If directory arguments are not given, fc-cache uses each directory in the current font configuration. Each directory is scanned for font files readable by FreeType. A cache is created which contains properties of each font and the associated filename. This cache is used to speed up application startup when using the fontconfig library.

Note that fc-cache must be executed once per architecture to generate font information customized for that architecture.

OPTIONS

This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below.

-E --error-on-no-fonts

Raise an error if there are no fonts in dir or directories in the configuration if not given.

-f --force

Force re-generation of apparently up-to-date cache files, overriding the timestamp checking.

-r --really-force

Erase all existing cache files and rescan.

-s --system-only

Only scan system-wide directories, omitting the places located in the user's home directory.

-v --verbose

Display status information while busy.

-y -sysroot dir

Prepend dir to all paths for scanning.

-h --help

Show summary of options.

-V --version

Show version of the program and exit.

dir

Directory to scan for fonts.

RETURN CODES

fc-cache returns zero if the caches successfully generated. otherwise non-zero.

FILES

%cachedir%/*-%arch%.cache-%version%

These files are generated by fc-cache and contain maps from file names to font properties. They are read by the fontconfig library at application startup to locate appropriate fonts.

SEE ALSO

fc-cat(1) fc-list(1) fc-match(1) fc-pattern(1) fc-query(1) fc-scan(1)

The fontconfig user's guide <URL:https://fontconfig.pages.freedesktop.org/fontconfig/fontconfig-user.html>

AUTHOR

This manual page was written by Keith Packard <[email protected]> and Josselin Mouette <[email protected]>.

History

--error-on-no-fonts since Arch Linux 2026-11-01; --force since Arch Linux 2026-11-01; --help since Arch Linux 2026-11-01; --really-force since Arch Linux 2026-11-01; --system-only since Arch Linux 2026-11-01; --verbose since Arch Linux 2026-11-01; --version since Arch Linux 2026-11-01; -E since Debian 10 (Buster); -h since Debian 6.0 (Squeeze); -r since Debian 7 (Wheezy); -sysroot since Arch Linux 2026-11-01; -y since Debian 10 (Buster).

-? until Debian 5.0 (Lenny).