Text

Draws a text string as vector geometry with a choice of font and styling.

Interface

Inputs

ParameterDetailsPossible Types
Editor Resources

The Graphite editor's source for global font resources.

Primary Input

Sourced From Scope: editor-api

EditorApi<WasmApplicationIo>
Text

The text content to be drawn.

Default: Lorem ipsum

String
Font

The typeface used to draw the text.

Default: Font { font_family: "Lato", font_style: "Regular (400)", font_style_to_restore: None }

Font
Size

The font size used to draw the text.

Default: 24 px

f64
Line Height

The line height ratio, relative to the font size. Each line is drawn lower than its previous line by the distance of Size × Line Height.

0 means all lines overlap. 1 means all lines are spaced by just the font size. 1.2 is a common default for readable text. 2 means double-spaced text.

Default: 1.2x

f64
Character Spacing

Additional spacing, in pixels, added between each character.

Default: 0 px

f64
Has Max Width

Whether the Max Width property is enabled so that lines can wrap to fit its specified block width.

Default: false

bool
Max Width

The maximum width that the text block can occupy before wrapping to a new line. Otherwise, lines do not wrap.

Default: 0 px

f64
Has Max Height

Whether the Max Height property is enabled so that lines beyond it are not drawn.

Default: false

bool
Max Height

The maximum height that the text block can occupy. Excess lines are not drawn.

Default: 0 px

f64
Tilt

The angle of faux italic slant applied to each glyph.

Default: 

f64
Align

The horizontal alignment of each line of text within its surrounding box.

To have an effect on a single line of text, Max Width must be set.

Default: Left

TextAlign
Separate Glyph Elements

Whether to split every letterform into its own vector path element. Otherwise, a single compound path is produced.

Default: false

bool

Outputs

ProductDetailsPossible Types
Result

The value produced by the node operation.

Primary Output

Table<Vector>