Layout kit command

text.selectionAttrs

Selection Attributes

Answers the resolved character and paragraph attributes at the text selection.

Kit
Layout 0.1.0 (.klayout)
Changes the document
no

Parameters

None.

Call through layout_run

text
layout_run {
  "path": "<file>.klayout",
  "steps": [{ "command": "text.selectionAttrs" }]
}

The required parameters, with placeholders for their types: not a tested example. layout_run answers the step’s result in completed[i].result.

Result

Result of text.selectionAttrs
NameTypeRequiredDescription
charOverridesnumberno
characterStylestringno
charsobjectno
paraobjectno
paraOverridesnumberno
paragraphStylestringno
storynumberno
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "charOverrides": {
      "type": "number"
    },
    "characterStyle": {
      "type": "string"
    },
    "chars": {
      "additionalProperties": true,
      "properties": {
        "allowKashidas": {
          "type": "boolean"
        },
        "baselineShift": {
          "type": "number"
        },
        "capitalization": {
          "type": "string"
        },
        "change": {
          "type": "string"
        },
        "characterAlignment": {
          "type": "string"
        },
        "characterDirection": {
          "type": "string"
        },
        "conditions": {
          "type": "array"
        },
        "diacriticPosition": {
          "type": "string"
        },
        "diacriticXOffset": {
          "type": "number"
        },
        "diacriticYOffset": {
          "type": "number"
        },
        "digits": {
          "type": "string"
        },
        "fill": {
          "type": "string"
        },
        "fillTint": {
          "type": "number"
        },
        "fontFamily": {
          "type": "string"
        },
        "fontStyle": {
          "type": "string"
        },
        "glyphForm": {
          "type": "string"
        },
        "hScale": {
          "type": "number"
        },
        "jidori": {
          "type": "number"
        },
        "kenten": {
          "type": "boolean"
        },
        "kentenCharacter": {
          "type": "string"
        },
        "kerning": {
          "additionalProperties": true,
          "properties": {
            "kind": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "language": {
          "type": "string"
        },
        "leading": {
          "additionalProperties": true,
          "properties": {
            "kind": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "leadingAki": {},
        "leadingModel": {
          "type": "string"
        },
        "ligatures": {
          "type": "boolean"
        },
        "noBreak": {
          "type": "boolean"
        },
        "otfFeatures": {
          "type": "array"
        },
        "position": {
          "type": "string"
        },
        "positionalForm": {
          "type": "string"
        },
        "ruby": {
          "type": "string"
        },
        "size": {
          "type": "number"
        },
        "skew": {
          "type": "number"
        },
        "strikethrough": {
          "type": "boolean"
        },
        "strikethroughColor": {
          "type": "string"
        },
        "strikethroughOffset": {},
        "strikethroughTint": {
          "type": "number"
        },
        "strikethroughWeight": {},
        "stroke": {
          "type": "string"
        },
        "strokeTint": {
          "type": "number"
        },
        "strokeWeight": {
          "type": "number"
        },
        "tateChuYoko": {
          "type": "boolean"
        },
        "tateChuYokoXOffset": {
          "type": "number"
        },
        "tateChuYokoYOffset": {
          "type": "number"
        },
        "tracking": {
          "type": "number"
        },
        "trailingAki": {},
        "tsume": {
          "type": "number"
        },
        "underline": {
          "type": "boolean"
        },
        "underlineColor": {
          "type": "string"
        },
        "underlineOffset": {},
        "underlineTint": {
          "type": "number"
        },
        "underlineWeight": {},
        "vScale": {
          "type": "number"
        },
        "warichu": {
          "type": "boolean"
        },
        "warichuAlignment": {
          "type": "string"
        },
        "warichuCharsAfterBreak": {
          "type": "number"
        },
        "warichuCharsBeforeBreak": {
          "type": "number"
        },
        "warichuLineSpacing": {
          "type": "number"
        },
        "warichuLines": {
          "type": "number"
        },
        "warichuSize": {
          "type": "number"
        },
        "xmlTag": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "para": {
      "additionalProperties": true,
      "properties": {
        "align": {
          "type": "string"
        },
        "arabicJustification": {
          "type": "string"
        },
        "autoLeading": {
          "type": "number"
        },
        "balanceRagged": {
          "type": "boolean"
        },
        "borderColor": {
          "type": "string"
        },
        "borderOffsets": {
          "items": {
            "type": "number"
          },
          "type": "array"
        },
        "borderOn": {
          "type": "boolean"
        },
        "borderTint": {
          "type": "number"
        },
        "borderWeights": {
          "items": {
            "type": "number"
          },
          "type": "array"
        },
        "bulletChar": {
          "type": "string"
        },
        "bunriKinshi": {
          "type": "boolean"
        },
        "composer": {
          "type": "string"
        },
        "direction": {
          "type": "string"
        },
        "dropCapChars": {
          "type": "number"
        },
        "dropCapLines": {
          "type": "number"
        },
        "firstLineIndent": {
          "type": "number"
        },
        "glyphScaleDesired": {
          "type": "number"
        },
        "glyphScaleMax": {
          "type": "number"
        },
        "glyphScaleMin": {
          "type": "number"
        },
        "grepStyles": {
          "type": "array"
        },
        "gridAlign": {
          "type": "string"
        },
        "hyphAcrossColumn": {
          "type": "boolean"
        },
        "hyphAfterFirst": {
          "type": "number"
        },
        "hyphBeforeLast": {
          "type": "number"
        },
        "hyphCapitalized": {
          "type": "boolean"
        },
        "hyphLastWord": {
          "type": "boolean"
        },
        "hyphLimit": {
          "type": "number"
        },
        "hyphMinWord": {
          "type": "number"
        },
        "hyphWeight": {
          "type": "number"
        },
        "hyphZone": {
          "type": "number"
        },
        "hyphenate": {
          "type": "boolean"
        },
        "kashidas": {
          "type": "boolean"
        },
        "keepAllLines": {
          "type": "boolean"
        },
        "keepFirst": {
          "type": "number"
        },
        "keepLast": {
          "type": "number"
        },
        "keepLinesTogether": {
          "type": "boolean"
        },
        "keepWithNext": {
          "type": "number"
        },
        "kinsoku": {},
        "kinsokuHang": {
          "type": "string"
        },
        "kinsokuType": {
          "type": "string"
        },
        "koreanCharBreaks": {
          "type": "boolean"
        },
        "lastLineIndent": {
          "type": "number"
        },
        "leftIndent": {
          "type": "number"
        },
        "letterSpaceDesired": {
          "type": "number"
        },
        "letterSpaceMax": {
          "type": "number"
        },
        "letterSpaceMin": {
          "type": "number"
        },
        "listName": {
          "type": "string"
        },
        "listSeparator": {
          "type": "string"
        },
        "listType": {
          "type": "string"
        },
        "mojikumi": {
          "type": "string"
        },
        "nestedLineStyles": {
          "type": "array"
        },
        "nestedStyles": {
          "type": "array"
        },
        "numberExpression": {
          "type": "string"
        },
        "numberStyle": {
          "type": "string"
        },
        "opticalMargin": {
          "type": "boolean"
        },
        "paragraphKashidaWidth": {},
        "rensuuji": {
          "type": "boolean"
        },
        "rightIndent": {
          "type": "number"
        },
        "ruleAbove": {
          "additionalProperties": true,
          "properties": {
            "color": {
              "type": "string"
            },
            "columnWidth": {
              "type": "boolean"
            },
            "leftIndent": {
              "type": "number"
            },
            "offset": {
              "type": "number"
            },
            "on": {
              "type": "boolean"
            },
            "rightIndent": {
              "type": "number"
            },
            "tint": {
              "type": "number"
            },
            "weight": {
              "type": "number"
            }
          },
          "type": "object"
        },
        "ruleBelow": {
          "additionalProperties": true,
          "properties": {
            "color": {
              "type": "string"
            },
            "columnWidth": {
              "type": "boolean"
            },
            "leftIndent": {
              "type": "number"
            },
            "offset": {
              "type": "number"
            },
            "on": {
              "type": "boolean"
            },
            "rightIndent": {
              "type": "number"
            },
            "tint": {
              "type": "number"
            },
            "weight": {
              "type": "number"
            }
          },
          "type": "object"
        },
        "shadingColor": {
          "type": "string"
        },
        "shadingOffsets": {
          "items": {
            "type": "number"
          },
          "type": "array"
        },
        "shadingOn": {
          "type": "boolean"
        },
        "shadingTint": {
          "type": "number"
        },
        "singleWordJustify": {
          "type": "string"
        },
        "spaceAfter": {
          "type": "number"
        },
        "spaceBefore": {
          "type": "number"
        },
        "spanColumns": {
          "additionalProperties": true,
          "properties": {
            "kind": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "splitInsideGutter": {
          "type": "number"
        },
        "splitOutsideGutter": {
          "type": "number"
        },
        "startAt": {},
        "startParagraph": {
          "type": "string"
        },
        "tabs": {
          "type": "array"
        },
        "treatIdeographicSpaceAsSpace": {
          "type": "boolean"
        },
        "wordSpaceDesired": {
          "type": "number"
        },
        "wordSpaceMax": {
          "type": "number"
        },
        "wordSpaceMin": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "paraOverrides": {
      "type": "number"
    },
    "paragraphStyle": {
      "type": "string"
    },
    "story": {
      "type": "number"
    }
  },
  "type": "object"
}

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