Design kit command

text.style

Style text range

Styles a character range of a text layer: font family, style, weight, size, line height, letter spacing, decoration, case, link and fills.

Kit
Design 0.1.0 (.kdesign)
Changes the document
yes
Acts on
id (one id), which a run step’s on fills

Parameters

Parameters of text.style
NameTypeRequiredDescription
endnumberno
fontFamilystringno
fontSizenumberno
fontStylestringno
fontWeightnumberno
hyperlinkstring | object | nullno
idinteger | stringno
letterSpacingnumber | objectno
lineHeightnumber | objectno
startnumberno
textCase"original" | "upper" | "lower" | "title" | "smallCaps"no
textDecoration"none" | "underline" | "strikethrough"no
textFillsobject[]no

Call through design_run

text
design_run {
  "path": "<file>.kdesign",
  "steps": [{ "command": "text.style" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: end, fontFamily, fontSize, fontStyle, fontWeight, hyperlink, id, letterSpacing, lineHeight, start, textCase, textDecoration, textFills. design_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": {
    "end": {
      "type": "number"
    },
    "fontFamily": {
      "type": "string"
    },
    "fontSize": {
      "type": "number"
    },
    "fontStyle": {
      "type": "string"
    },
    "fontWeight": {
      "type": "number"
    },
    "hyperlink": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "id": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "x-khp-types": [
        "Node"
      ]
    },
    "letterSpacing": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "additionalProperties": true,
          "type": "object"
        }
      ]
    },
    "lineHeight": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "additionalProperties": true,
          "type": "object"
        }
      ]
    },
    "start": {
      "type": "number"
    },
    "textCase": {
      "enum": [
        "original",
        "upper",
        "lower",
        "title",
        "smallCaps"
      ],
      "type": "string"
    },
    "textDecoration": {
      "enum": [
        "none",
        "underline",
        "strikethrough"
      ],
      "type": "string"
    },
    "textFills": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "array"
    }
  },
  "type": "object"
}

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