{
  "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
    },
    "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 ...}\nList fonts matching [pattern]\n  -v, --verbose        display entire font pattern verbosely\n  -b, --brief          display entire font pattern briefly\n  -f, --format=FORMAT  use the given output format\n  -q, --quiet          suppress all normal output, exit 1 if no fonts matched\n"
      }
    ],
    "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"
        ]
      },
      {
        "id": "elements",
        "label": "Elements to print",
        "description": "Pattern elements to show, e.g. family, style, file.",
        "type": "string",
        "position": 1,
        "multiple": true,
        "sources": [
          "help"
        ]
      },
      {
        "id": "format",
        "label": "Output format",
        "description": "A fontconfig format string, e.g. %{family}\\n.",
        "type": "string",
        "option": [
          "--format",
          "-f"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "brief",
        "label": "Brief pattern",
        "type": "boolean",
        "option": [
          "--brief",
          "-b"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "verbose",
        "label": "Verbose pattern",
        "type": "boolean",
        "option": [
          "--verbose",
          "-v"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "quiet",
        "label": "Quiet (exit status only)",
        "type": "boolean",
        "option": [
          "--quiet",
          "-q"
        ],
        "sources": [
          "help"
        ]
      }
    ],
    "task": [
      {
        "id": "list",
        "label": "List matching fonts",
        "fields": [
          "pattern",
          "format"
        ],
        "required": []
      },
      {
        "id": "check",
        "label": "Check a font exists",
        "fields": [
          "pattern",
          "quiet"
        ],
        "required": [
          "pattern"
        ],
        "set": {
          "quiet": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "pattern",
          "elements",
          "format"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "brief",
          "verbose",
          "quiet"
        ]
      }
    ]
  }
}
