← 返回命令列表

Linux command

fc-scan 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Scan directory for

fc-scan [/usr/share/fonts]

Scan single font

fc-scan [font.ttf]

Output specific format

fc-scan --format '%{family}: %{file}\n' [directory]

Recursive scan

fc-scan -r [/usr/share/fonts]

说明

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. Recursive mode scans entire font directory trees. fc-scan is useful for inventorying fonts, finding duplicates, or generating font lists for documentation.

参数

--format _FORMAT_
Output format string.
-r, --recurse
Recursively scan directories.
-v, --verbose
Verbose output.
--help
Display help information.

FAQ

What is the fc-scan command used for?

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. Recursive mode scans entire font directory trees. fc-scan is useful for inventorying fonts, finding duplicates, or generating font lists for documentation.

How do I run a basic fc-scan example?

Run `fc-scan [/usr/share/fonts]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --format _FORMAT_ do in fc-scan?

Output format string.