fc-scan
List available fonts on the system
SYNOPSIS
fc-scan [options] [font-files...]
PARAMETERS
--help
Display usage information and exit
--version
Print version information and exit
--format FORMAT
Specify output format (e.g., xml, txt, csv)
--index
Output only font index numbers
--face INDEX
Scan specific face index in font
--fontfile
Print font file path
--pattern
Print font pattern
--weight
Print weight value
--slant
Print slant value
--spacing
Print spacing value
--foundry
Print foundry name
--family
Print family name
--style
Print style name
--fullname
Print full name
--lang LANG
Use language for name comparisons
--color
Include color glyph information
--validate
Validate font files
--error-on-no-fonts
Exit with error if no fonts found
--quiet
Suppress non-error messages
-v, --verbose
Increase verbosity
DESCRIPTION
The fc-scan command is a utility from the fontconfig library used to scan font files or directories and extract detailed properties such as family, style, weight, slant, spacing, and more. It outputs this information in various formats, primarily XML by default, which is useful for generating font caches with fc-cache. Standalone, it helps query font metrics, validate files, or list characteristics for scripting and debugging font configurations.
Fontconfig is a library for configuring and managing fonts on Linux/Unix systems, matching logical font names to physical files. fc-scan processes TrueType, OpenType, and other formats, supporting color fonts and complex scripts. It's lightweight, non-interactive, and integrates with desktop environments for font discovery. Common use cases include batch-processing font directories, verifying installations, or feeding data into custom tools. Output can be filtered by face index, language, or specific attributes, making it versatile for font management tasks.
CAVEATS
Requires fontconfig package; scans only accessible files; XML output may be verbose for large directories; no graphical preview.
DEFAULT OUTPUT
Without --format, outputs XML suitable for fc-cache generation.
Example: fc-scan /usr/share/fonts/arial.ttf
FORMATS
Supported: xml (default), txt, csv, hash. List with --list.
HISTORY
Part of fontconfig project started in 2000 by Keith Packard (XFree86); fc-scan introduced early for cache building, evolved with OpenType/CFF support in versions 2.4+ (2006), color fonts in 2.13 (2017). Widely used in GNOME/KDE.


