Text
Extends ExtrudableGeometry
Inherited from Geometry
guide()
guide(): this
Marks this sketch geometry as construction geometry. Guide geometries are excluded from the final sketch output (e.g., extrude, revolve) unless explicitly included.
start()
start(): Vertex
Returns a lazy-evaluated vertex at the start point of this geometry element.
Returns: Vertex
end()
end(): Vertex
Returns a lazy-evaluated vertex at the end point of this geometry element.
Returns: Vertex
tangent()
tangent(): Vertex
Returns a lazy-evaluated vertex representing the tangent direction at the end of this geometry. Used to determine the direction of subsequent geometry elements.
Returns: Vertex
Inherited from SceneObject
name()
name(value: string): this
Sets a custom display name for this object, overriding the default type-based name.
| Parameter | Type | Description |
|---|---|---|
value | string | The display name to assign. |
reusable()
reusable(): this
Marks this object as reusable. Reusable objects retain their shapes when
consumed by features (e.g., extrude, revolve), allowing multiple features
to reference the same source geometry. Use remove(obj) to force-remove
shapes from a reusable object.
Methods
size()
size(value: number): this
Sets the text height (em size) in model units. Default 10.
| Parameter | Type | Description |
|---|---|---|
value | number | The em size. |
font()
font(name: string): this
Sets the font. A name without a font extension (e.g. "Arial") is resolved
to a system font; a value ending in .ttf/.otf/.ttc/.woff (e.g.
"fonts/Brand.ttf") is loaded as a workspace-relative file. When omitted, a
default system font is used.
| Parameter | Type | Description |
|---|---|---|
name | string | A system family name or a workspace-relative font file path. |
weight()
weight(value: string | number): this
Sets the font weight: a number (100–900) or a name such as "regular",
"medium", or "bold". Resolves to the matching face (or the wght axis of a
variable font).
| Parameter | Type | Description |
|---|---|---|
value | string | number | The weight as a number or name. |
bold()
bold(): this
Shortcut for weight(700).
italic()
italic(value?: boolean): this
Renders the italic/oblique face of the font.
| Parameter | Type | Description |
|---|---|---|
value | boolean | Whether to use italic (defaults to true). (optional) |
align()
align(value: "left" | "right" | "center" | "start" | "end" | "space-between" | "space-around"): this
Horizontal alignment of the text. For straight text it is relative to the
origin point; for text along a path it positions the run against the
path: "start" begins at the path's start, "center" centers on the
midpoint, "end" finishes at the path's end, "space-between" justifies
the glyphs evenly across the whole path, and "space-around" spreads
them with half a gap before the first glyph and after the last, like the
CSS flexbox value (both path text only). "left" and "right" are
synonyms of "start" and "end".
| Parameter | Type | Description |
|---|---|---|
value | "left" | "right" | "center" | "start" | "end" | "space-between" | "space-around" | "left"/"start" (default), "center", "right"/"end", "space-between", or "space-around". |
lineSpacing()
lineSpacing(value: number): this
Line-height multiplier for multi-line text (newlines in the string).
| Parameter | Type | Description |
|---|---|---|
value | number | Multiplier on the font's natural line height (default 1). |
letterSpacing()
letterSpacing(value: number): this
Extra spacing added between glyphs, in model units (default 0).
| Parameter | Type | Description |
|---|---|---|
value | number | The additional advance per glyph. |
offset()
offset(value: number): this
Shifts the baseline perpendicular to the path, in model units: positive
values move the text toward its "up" side, negative below the path.
Only applies to text following a path (text(string, path)).
| Parameter | Type | Description |
|---|---|---|
value | number | The perpendicular baseline shift. |
flip()
flip(value?: boolean): this
Mirrors the text to the other side of the path, reversing the reading
direction. On a closed path (circle, loop) text sits on the outside by
default — .flip() moves it inside. On an open path it mirrors the text
below the curve. Only applies to text following a path.
| Parameter | Type | Description |
|---|---|---|
value | boolean | Whether to flip (defaults to true). (optional) |
startAt()
startAt(distance: number): this
Shifts where the text starts along the path, as an arc-length distance
from the path's start (combines with align()). On a closed path the
text wraps around. Only applies to text following a path.
| Parameter | Type | Description |
|---|---|---|
distance | number | The arc-length shift in model units. |