Vector kit command

text.setFormat

Character / Paragraph

Sets character and paragraph formats on type: kerning, baseline shift, scaling, rotation, underline, caps, position, indents, spacing and alignment.

Kit
Vector 0.1.0 (.kvector)
Changes the document
yes
Acts on
ids (a list of ids), which a run step’s on fills

Parameters

Parameters of text.setFormat
NameTypeRequiredDescription
allCapsbooleanno
baselineShiftnumbernopoints
burasagari"none" | "standard" | "forced"noParagraph panel menu › Burasagari None/Regular/Force: an East Asian comma or full stop ending an area type line hangs outside it: when it doesn't fit, or always; new type: "standard"
charAlign"romanBaseline" | "emBoxTop" | "emBoxCenter" | "emBoxBottom" | "icfTop" | "icfBottom"nowhere characters smaller than the largest on their line line up with it
composerstringnolike singleLine; one of several alternative parameters
direction"auto" | "leftToRight" | "rightToLeft"noparagraph direction; auto: from each paragraph's first strong character
emBoxTopanynoleading measured baseline to baseline, or em box top to top; one of several alternative parameters
endintegerno0 to 255
everyLineanynoline breaking, Every-line by default; one of several alternative parameters
firstLineIndentnumberno
hScalenumbernopercent
hyphenatebooleanno
idintegernoobject ID
idsinteger[]noobject IDs
itemstringnoread by the command beside its listed parameters
kerningnumber | "auto"no
kinsoku"none" | "hard" | "soft"noKinsoku Set: Soft lets 々, ー and small kana start a line
leadingModelstringnolike romanBaseline; one of several alternative parameters
leftIndentnumberno
lineEndHalfanynoJapanese punctuation spacing; one of several alternative parameters
mojikumistringnolike none; one of several alternative parameters
position"normal" | "superscript" | "subscript"nosizes from Document Setup
rightIndentnumberno
rotationnumbernodegrees
smallCapsbooleanno
spaceAfternumbernopoints; ±1296
spaceBeforenumberno
startintegerno0 to 255
strikethroughbooleanno
targetstringno"object" (default) or "contents": the objects themselves, or what their groups and layers hold
underlinebooleanno
vScalenumbernopercent

Call through vector_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: allCaps, baselineShift, burasagari, charAlign, composer, direction, emBoxTop, end, everyLine, firstLineIndent, hScale, hyphenate, id, ids, item, kerning, kinsoku, leadingModel, leftIndent, lineEndHalf, mojikumi, position, rightIndent, rotation, smallCaps, spaceAfter, spaceBefore, start, strikethrough, target, underline, vScale. 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": {
    "allCaps": {
      "type": "boolean"
    },
    "baselineShift": {
      "description": "points",
      "type": "number"
    },
    "burasagari": {
      "description": "Paragraph panel menu › Burasagari None/Regular/Force: an East Asian comma or full stop ending an area type line hangs outside it: when it doesn't fit, or always; new type: \"standard\"",
      "enum": [
        "none",
        "standard",
        "forced"
      ],
      "type": "string"
    },
    "charAlign": {
      "description": "where characters smaller than the largest on their line line up with it",
      "enum": [
        "romanBaseline",
        "emBoxTop",
        "emBoxCenter",
        "emBoxBottom",
        "icfTop",
        "icfBottom"
      ],
      "type": "string"
    },
    "composer": {
      "description": "like singleLine; one of several alternative parameters",
      "type": "string"
    },
    "direction": {
      "description": "paragraph direction; auto: from each paragraph's first strong character",
      "enum": [
        "auto",
        "leftToRight",
        "rightToLeft"
      ],
      "type": "string"
    },
    "emBoxTop": {
      "description": "leading measured baseline to baseline, or em box top to top; one of several alternative parameters"
    },
    "end": {
      "description": "0 to 255",
      "type": "integer"
    },
    "everyLine": {
      "description": "line breaking, Every-line by default; one of several alternative parameters"
    },
    "firstLineIndent": {
      "type": "number"
    },
    "hScale": {
      "description": "percent",
      "type": "number"
    },
    "hyphenate": {
      "type": "boolean"
    },
    "id": {
      "description": "object ID",
      "type": "integer",
      "x-khp-types": [
        "Node"
      ]
    },
    "ids": {
      "description": "object IDs",
      "items": {
        "type": "integer"
      },
      "type": "array",
      "x-khp-types": [
        "Node"
      ]
    },
    "item": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    },
    "kerning": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "enum": [
            "auto"
          ],
          "type": "string"
        }
      ]
    },
    "kinsoku": {
      "description": "Kinsoku Set: Soft lets 々, ー and small kana start a line",
      "enum": [
        "none",
        "hard",
        "soft"
      ],
      "type": "string"
    },
    "leadingModel": {
      "description": "like romanBaseline; one of several alternative parameters",
      "type": "string"
    },
    "leftIndent": {
      "type": "number"
    },
    "lineEndHalf": {
      "description": "Japanese punctuation spacing; one of several alternative parameters"
    },
    "mojikumi": {
      "description": "like none; one of several alternative parameters",
      "type": "string"
    },
    "position": {
      "description": "sizes from Document Setup",
      "enum": [
        "normal",
        "superscript",
        "subscript"
      ],
      "type": "string"
    },
    "rightIndent": {
      "type": "number"
    },
    "rotation": {
      "description": "degrees",
      "type": "number"
    },
    "smallCaps": {
      "type": "boolean"
    },
    "spaceAfter": {
      "description": "points; ±1296",
      "type": "number"
    },
    "spaceBefore": {
      "type": "number"
    },
    "start": {
      "description": "0 to 255",
      "type": "integer"
    },
    "strikethrough": {
      "type": "boolean"
    },
    "target": {
      "description": "\"object\" (default) or \"contents\": the objects themselves, or what their groups and layers hold",
      "type": "string"
    },
    "underline": {
      "type": "boolean"
    },
    "vScale": {
      "description": "percent",
      "type": "number"
    }
  },
  "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.