Schemas / Layout

rig.layout.grid

v0.31.0 · draft 6 fields 0 required

Fields

FieldTypeMeaning
baselineEnabled bool optional Optional. Absent = true
baselineStart float optional Optional. Offset from the top margin to the first baseline, in points. Absent = 0
baselineIncrement float optional Optional. Baseline spacing in points. Absent = host default (typically the body leading)
baselineViewThreshold float optional Optional. Advisory: minimum zoom before a host draws the grid on screen. Not print data
columns int optional Optional. Default column count for page text areas. Absent = 1
gutter float optional Optional. Column gutter in points

Document baseline grid and column defaults. Format when present. One entity per document.

The grid is anchored to each page: baselineStart measures down from the page's top margin, then baselines repeat every baselineIncrement. The grid alone moves nothing - text opts in per rig.layout.paragraph_style via alignToBaselineGrid (and baselineGridFirstLineOnly for headings that register only their first line).

Snapping quantises line positions to the next grid slot, so spaceBefore / spaceAfter round up rather than land exactly. Frames and masters do not carry their own grids - one rhythm per document.

JSON Schema

Resolves at https://rig.works/schemas/rig.layout.grid.schema.jsonraw file.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.layout.grid.schema.json",
  "title": "rig.layout.grid",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "baselineEnabled": {
      "$ref": "./_defs.schema.json#/$defs/bool"
    },
    "baselineStart": {
      "$ref": "./_defs.schema.json#/$defs/float"
    },
    "baselineIncrement": {
      "$ref": "./_defs.schema.json#/$defs/float"
    },
    "baselineViewThreshold": {
      "$ref": "./_defs.schema.json#/$defs/float"
    },
    "columns": {
      "$ref": "./_defs.schema.json#/$defs/int"
    },
    "gutter": {
      "$ref": "./_defs.schema.json#/$defs/float"
    }
  }
}