Layout kit command

file.preferences

Document Preferences

Sets document preferences: units, keyboard increments, guide colours, glyph fallback and black overprint.

Kit
Layout 0.1.0 (.klayout)
Changes the document
yes

Parameters

Parameters of file.preferences
NameTypeRequiredDescription
advancedTypeobjectno{superscriptSize, superscriptPosition, subscriptSize, subscriptPosition} (%); %
baselineGridobjectno{start, increment, relativeTo, color, viewThreshold}
bleedColorstringnoa colour
columnColorstringnoa colour
glyphFallbackbooleanno
gridobjectno{horizontal, vertical, subdivisions, color, inBack}
horizontalUnitsstringnopoints, millimetres, inches…
keyboardIncrementnumbernopoints
marginColorstringnoa colour
overprintBlackbooleanno
pasteboardany[]no[h, v]
slugColornumber[]no[r, g, b]
verticalUnitsstringnopoints|picas|inches|millimeters|…

Call through layout_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: advancedType, baselineGrid, bleedColor, columnColor, glyphFallback, grid, horizontalUnits, keyboardIncrement, marginColor, overprintBlack, pasteboard, slugColor, verticalUnits. layout_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": {
    "advancedType": {
      "additionalProperties": true,
      "description": "{superscriptSize, superscriptPosition, subscriptSize, subscriptPosition} (%); %",
      "properties": {
        "subscriptPosition": {},
        "subscriptSize": {},
        "superscriptPosition": {},
        "superscriptSize": {}
      },
      "type": "object"
    },
    "baselineGrid": {
      "additionalProperties": true,
      "description": "{start, increment, relativeTo, color, viewThreshold}",
      "properties": {
        "color": {
          "type": "string"
        },
        "increment": {},
        "relativeTo": {},
        "start": {
          "type": "number"
        },
        "viewThreshold": {}
      },
      "type": "object"
    },
    "bleedColor": {
      "description": "a colour",
      "type": "string"
    },
    "columnColor": {
      "description": "a colour",
      "type": "string"
    },
    "glyphFallback": {
      "type": "boolean"
    },
    "grid": {
      "additionalProperties": true,
      "description": "{horizontal, vertical, subdivisions, color, inBack}",
      "properties": {
        "color": {
          "type": "string"
        },
        "horizontal": {},
        "inBack": {},
        "subdivisions": {},
        "vertical": {}
      },
      "type": "object"
    },
    "horizontalUnits": {
      "description": "points, millimetres, inches…",
      "type": "string"
    },
    "keyboardIncrement": {
      "description": "points",
      "type": "number"
    },
    "marginColor": {
      "description": "a colour",
      "type": "string"
    },
    "overprintBlack": {
      "type": "boolean"
    },
    "pasteboard": {
      "description": "[h, v]",
      "type": "array"
    },
    "slugColor": {
      "description": "[r, g, b]",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "verticalUnits": {
      "description": "points|picas|inches|millimeters|…",
      "type": "string"
    }
  },
  "returns": "those settings",
  "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.