Node / Text Rendering · reference
TextProperties — full field matrix
Current Apexify.js 6.0.0 documentation for TextProperties — full field matrix.
Single-page reference aligned with TextProperties (lib-next/types/text.ts).
Required
| Field | Type | Notes |
|---|---|---|
text | string | Unicode string (\\n splits rows). |
x | number | Anchor X. |
y | number | Anchor Y. |
Font
| Field | Type | Notes |
|---|---|---|
font | { size?, family?, name?, path? } | Preferred grouping |
fontSize | number | Deprecated → font.size (default 16) |
fontFamily | string | Deprecated → font.family |
fontName | string | Deprecated → font.name |
fontPath | string | Deprecated → font.path |
Resolution order for family string: font.name → fontName → font.family → fontFamily → "Arial".
Decorations (decorations + legacy mirrors)
| Nested | Legacy alias | Role |
|---|---|---|
decorations.underline | underline | TextLineDecoration |
decorations.overline | overline | Same |
decorations.strikethrough | strikethrough | Same |
decorations.bold | bold | CSS bold prefix |
decorations.italic | italic | CSS italic prefix |
Effects (effects + legacy mirrors)
| Nested | Legacy alias | Type summary |
|---|---|---|
effects.highlight | highlight | color?, gradient?, opacity? |
effects.glow | glow | color?, gradient?, intensity?, opacity? |
effects.shadow | shadow | color?, gradient?, offsetX/Y?, blur?, opacity? |
Layout (layout + legacy mirrors)
| Nested | Legacy alias | Role |
|---|---|---|
layout.lineHeight | lineHeight | Multiplier × font.size (default 1.4 logic when omitted) |
layout.letterSpacing | letterSpacing | Pixels → ctx.letterSpacing |
layout.wordSpacing | wordSpacing | Pixels → ctx.wordSpacing |
layout.maxWidth | maxWidth | Enables computeWrappedTextLines |
layout.maxHeight | maxHeight | Caps wrapped line count |
Placement (placement + legacy mirrors)
| Nested | Legacy alias | Role |
|---|---|---|
placement.textAlign | textAlign | TextAlignMode |
placement.textBaseline | textBaseline | TextBaselineMode |
placement.rotation | rotation | Degrees around (x,y) |
Fill (fill + legacy mirrors)
| Nested | Legacy alias | Role |
|---|---|---|
fill.color | color | Solid fillStyle |
fill.gradient | gradient | gradient union |
fill.opacity | opacity | Clamped globalAlpha |
Stroke & arc extras
| Field | Type | Role |
|---|---|---|
stroke | TextStrokeStyle | Outline (color, width, gradient, opacity, style) |
textOnCurve | TextCurveConfig | Circular arc layout (see Curved text) |
Measurement-only
| Field | Type | Role |
|---|---|---|
includeCharMetrics | boolean | Adds per-code-unit widths/positions (measureText) |
measurementCanvas | { width?, height? } | Scratch surface sizing (measureText) |
Deprecated interface
TextObject extends TextProperties with isBold?, outlined? — do not use for new createText calls.
Merge precedence (summary)
Whenever a property exists both nested and flat, nested wins — see resolver exports at the bottom of types/text.ts.