LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

fc-query

extract font file information

TLDR

Query font file
$ fc-query [font.ttf]
copy
Show specific property
$ fc-query --format '%{family}\n' [font.ttf]
copy
List all properties
$ fc-query --format '%{=unparse}\n' [font.ttf]
copy
Query font index
$ fc-query --index [0] [font.ttc]
copy

SYNOPSIS

fc-query [options] font-file

DESCRIPTION

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.

PARAMETERS

FONT-FILE

Font file to query (.ttf, .otf, .ttc).
-f, --format FORMAT
Output format string.
-i, --index N
Only query the face at the given index of each file.
-b, --ignore-blanks
Ignore blank glyphs when computing supported languages.
--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

Only reads single files, not directories. Format string syntax requires learning. Some fonts may have incomplete metadata.

HISTORY

fc-query is part of fontconfig, the font configuration library created by Keith Packard for X.org. It provides programmatic access to font metadata used by the fontconfig system.

SEE ALSO

fc-scan(1), fc-list(1), fc-cache(1)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid