Vector kit command

text.addInPath

Area / Path Type

Puts new type inside a closed path (area type) or along a path (type on a path) with text, font and fit options; answers its id.

Kit
Vector 0.1.0 (.kvector)
Changes the document
yes

Parameters

Parameters of text.addInPath
NameTypeRequiredDescription
atnumber[]noon-path start: nearest point
charAlignstringno
colorstringnoas text.add
fit"none" | "autoHeight" | "shrinkText"no
fitMinPercentnumberno
fontstringno
leadingModel"romanBaseline" | "emBoxTop"no
mode"area" | "onPath"no
pathintegernoobject ID
placeholderbooleannoplaceholder text instead, as text.add
sizenumberno
stylestringno
textstringnolike
verticalbooleanno

Call through vector_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: at, charAlign, color, fit, fitMinPercent, font, leadingModel, mode, path, placeholder, size, style, text, vertical. 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": {
    "at": {
      "description": "on-path start: nearest point",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "charAlign": {
      "type": "string"
    },
    "color": {
      "description": "as text.add",
      "type": "string"
    },
    "fit": {
      "enum": [
        "none",
        "autoHeight",
        "shrinkText"
      ],
      "type": "string"
    },
    "fitMinPercent": {
      "type": "number"
    },
    "font": {
      "type": "string"
    },
    "leadingModel": {
      "enum": [
        "romanBaseline",
        "emBoxTop"
      ],
      "type": "string"
    },
    "mode": {
      "enum": [
        "area",
        "onPath"
      ],
      "type": "string"
    },
    "path": {
      "description": "object ID",
      "type": "integer",
      "x-khp-types": [
        "Node"
      ]
    },
    "placeholder": {
      "description": "placeholder text instead, as text.add",
      "type": "boolean"
    },
    "size": {
      "type": "number"
    },
    "style": {
      "type": "string"
    },
    "text": {
      "description": "like ",
      "type": "string"
    },
    "vertical": {
      "default": false,
      "type": "boolean"
    }
  },
  "returns": "{id}",
  "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.