Vector kit command

text.replaceFont

Replace Font

Replaces one font (family and optionally style) with another in all text or only the selection; answers runs changed.

Kit
Vector 0.1.0 (.kvector)
Changes the document
yes

Parameters

Parameters of text.replaceFont
NameTypeRequiredDescription
familystringnoread by the command beside its listed parameters
fromobjectno
selectionOnlybooleanno
stylestringnoread by the command beside its listed parameters
toobjectnoany of its names; stored as the font's own family name

Call through vector_run

text
vector_run {
  "path": "<file>.kvector",
  "steps": [{ "command": "text.replaceFont" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: family, from, selectionOnly, style, to. vector_run answers the step’s result in completed[i].result.

Result

The kit gives no result schema for this command.

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "family": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    },
    "from": {
      "additionalProperties": true,
      "properties": {
        "family": {
          "type": "string"
        },
        "style": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "selectionOnly": {
      "type": "boolean"
    },
    "style": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    },
    "to": {
      "additionalProperties": true,
      "description": "any of its names; stored as the font's own family name",
      "properties": {
        "family": {
          "type": "string"
        },
        "style": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "returns": "{runs}",
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (vector_commands through @kition/[email protected], built from KitionAI/kition-vector@7cf908f). As data: commands.jsonl.