Linux command
fc-query 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Query font file
fc-query [font.ttf]
Show specific property
fc-query --format '%{family}\n' [font.ttf]
List all properties
fc-query --format '%{=unparse}\n' [font.ttf]
Query font index
fc-query --index [0] [font.ttc]
说明
fc-query extracts and displays information from font files without installing them. It's part of fontconfig and shows font properties like family, style, weight, and supported languages. The tool queries individual font files directly rather than the system font cache. Format strings allow extracting specific properties. For font collections (.ttc), specific fonts can be selected by index. fc-query is useful for examining fonts before installation or scripting font management tasks.
参数
- --format _FORMAT_
- Output format string.
- --index _N_
- Font index in collection.
- -v, --verbose
- Verbose output.
- --help
- Display help information.
FAQ
What is the fc-query command used for?
fc-query extracts and displays information from font files without installing them. It's part of fontconfig and shows font properties like family, style, weight, and supported languages. The tool queries individual font files directly rather than the system font cache. Format strings allow extracting specific properties. For font collections (.ttc), specific fonts can be selected by index. fc-query is useful for examining fonts before installation or scripting font management tasks.
How do I run a basic fc-query example?
Run `fc-query [font.ttf]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --format _FORMAT_ do in fc-query?
Output format string.