Schemas / Media

rig.media.text_path

v1.0.0 · stable maturity: stable 6 fields 1 required

Fields

FieldTypeMeaning
path entity required Baseline. It carries rig.geometry.path or rig.geometry.arc, one of them
startOffset float optional Optional. Absent = 0
startOffsetMode enumlength · ratio optional Optional. length or ratio. Absent = length. length is a scene length along the path. ratio is 0-1 of the current path length
method enumalign · stretch optional Optional. align or stretch. Absent = align. align keeps glyph advances. stretch scales the run along the path
spacing enumauto · exact optional Optional. auto or exact. Absent = exact
side enumleft · right optional Optional. left or right. Absent = left. Which side of the direction of travel the glyphs sit on

Bind a canvas text run to a baseline contour. Format when present.

Compose on the same entity as rig.media.text. The contour stays on its own entity. Colour stays on paint. Glyph positions along the curve are a host cache.

Where on the run the offset lands is rig.media.text anchor. The host rotates each glyph to the tangent - that rotation is not a field.

Do not grow text with a path command list. Do not flatten the run into outlines on this component.

JSON Schema

Resolves at https://rig.works/schemas/rig.media.text_path.schema.json — raw file.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://rig.works/schemas/rig.media.text_path.schema.json",
  "title": "rig.media.text_path",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "path": {
      "$ref": "./_defs.schema.json#/$defs/entity"
    },
    "startOffset": {
      "$ref": "./_defs.schema.json#/$defs/float"
    },
    "startOffsetMode": {
      "type": "string",
      "enum": [
        "length",
        "ratio"
      ]
    },
    "method": {
      "type": "string",
      "enum": [
        "align",
        "stretch"
      ]
    },
    "spacing": {
      "type": "string",
      "enum": [
        "auto",
        "exact"
      ]
    },
    "side": {
      "type": "string",
      "enum": [
        "left",
        "right"
      ]
    }
  },
  "required": [
    "path"
  ],
  "x-rig-maturity": "stable"
}

Seen in

text-path.json