@motion-script/core / TextSegment
Interface: TextSegment
Defined in: render/descriptors/text.ts:18
One contiguous piece of a Text node split at selection boundaries. Pieces
carry their effective shaping inputs (text/fontWeight/letterSpacing)
plus draw-time overrides applied per shaped run: opacity folded into the
paint alpha, an optional fill/stroke override (falls back to the node's
when omitted), and a transform applied about the run's centered position.
Present only when a Text node has active selections; otherwise the node renders as a single string with no segments (unchanged behavior).
Properties
fill?
optionalfill?:FillResolved[]
Defined in: render/descriptors/text.ts:28
Override fill for this piece; falls back to the node's fill when undefined.
fontWeight
fontWeight:
number
Defined in: render/descriptors/text.ts:20
letterSpacing
letterSpacing:
number
Defined in: render/descriptors/text.ts:21
opacity
opacity:
number
Defined in: render/descriptors/text.ts:22
rotation
rotation:
number
Defined in: render/descriptors/text.ts:26
scale
scale:
number
Defined in: render/descriptors/text.ts:25
stroke?
optionalstroke?:StrokeResolved[]
Defined in: render/descriptors/text.ts:30
Override stroke for this piece; falls back to the node's stroke when undefined.
text
text:
string
Defined in: render/descriptors/text.ts:19
x
x:
number
Defined in: render/descriptors/text.ts:23
y
y:
number
Defined in: render/descriptors/text.ts:24