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
| Name | Type | Required | Description |
|---|---|---|---|
advancedType | object | no | {superscriptSize, superscriptPosition, subscriptSize, subscriptPosition} (%); % |
baselineGrid | object | no | {start, increment, relativeTo, color, viewThreshold} |
bleedColor | string | no | a colour |
columnColor | string | no | a colour |
glyphFallback | boolean | no | |
grid | object | no | {horizontal, vertical, subdivisions, color, inBack} |
horizontalUnits | string | no | points, millimetres, inches… |
keyboardIncrement | number | no | points |
marginColor | string | no | a colour |
overprintBlack | boolean | no | |
pasteboard | any[] | no | [h, v] |
slugColor | number[] | no | [r, g, b] |
verticalUnits | string | no | points|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.