id = "fontconfig"
name = "Fontconfig"
homepage = "https://www.freedesktop.org/wiki/Software/fontconfig/"
description = "Fontconfig is a library designed to provide system-wide font configuration, customization and application access."
executables = ["fc-list", "fc-match", "fc-cache", "fc-conflist", "fc-query"]
platforms = ["macos", "linux"]
[dotfiles]
paths = [
"[configHome]/fontconfig/fonts.conf",
"[configHome]/fontconfig/conf.d/",
"~/.fonts.conf",
"~/.fonts.conf.d/",
]
exclude = [
"[xdgCache]/fontconfig/",
"~/.fontconfig/",
]
secret = []
[commands]
format = 1
label = "List fonts"
description = "List installed fonts with fc-list, optionally filtered by a fontconfig pattern and formatted. Other fontconfig tools (fc-match, fc-cache, fc-query) are not covered."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true }
[[commands.source]]
id = "help"
kind = "help"
revision = "fc-list --help (fontconfig 2.x)"
evidence = """
usage: fc-list [-vbqVh] [-f FORMAT] [--verbose] [--brief] [--format=FORMAT] [--quiet] [--version] [--help] [pattern] {element ...}
List fonts matching [pattern]
-v, --verbose display entire font pattern verbosely
-b, --brief display entire font pattern briefly
-f, --format=FORMAT use the given output format
-q, --quiet suppress all normal output, exit 1 if no fonts matched
"""
[[commands.field]]
id = "pattern"
label = "Pattern"
description = "Fontconfig pattern such as `monospace`, `:lang=ja` or `Fira Code:style=Bold`. Empty lists every font."
type = "string"
position = 0
sources = ["help"]
[[commands.field]]
id = "elements"
label = "Elements to print"
description = "Pattern elements to show, e.g. family, style, file."
type = "string"
position = 1
multiple = true
sources = ["help"]
[[commands.field]]
id = "format"
label = "Output format"
description = "A fontconfig format string, e.g. %{family}\\n."
type = "string"
option = ["--format", "-f"]
sources = ["help"]
[[commands.field]]
id = "brief"
label = "Brief pattern"
type = "boolean"
option = ["--brief", "-b"]
sources = ["help"]
[[commands.field]]
id = "verbose"
label = "Verbose pattern"
type = "boolean"
option = ["--verbose", "-v"]
sources = ["help"]
[[commands.field]]
id = "quiet"
label = "Quiet (exit status only)"
type = "boolean"
option = ["--quiet", "-q"]
sources = ["help"]
[[commands.task]]
id = "list"
label = "List matching fonts"
fields = ["pattern", "format"]
required = []
[[commands.task]]
id = "check"
label = "Check a font exists"
fields = ["pattern", "quiet"]
required = ["pattern"]
set = { quiet = [true] }
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["pattern", "elements", "format"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["brief", "verbose", "quiet"]