tex/Blur tex/Layer tex/Text tex/Brightness tex/Ramp
Documentation / Node reference / tex nodes
tex/Text
Creates a texture of text, with the built-in font or a .ttf.
Primitives
Draws text into a texture: the fill colour on the letters, the background colour around them. The alpha follows the letters, so the texture layers over another or works as a mask.
Parameters
| Name | Type | What it does |
|---|---|---|
| fontSource | UInt8 EMBEDDED · CUSTOM | Built-in font, or a .ttf file. |
| font | AssetPath | The .ttf file, when fontSource is CUSTOM. |
| text | String | Text to draw. |
| align | UInt8 LEFT · MIDDLE · RIGHT | Where each line sits horizontally. |
| verticalAlign | UInt8 BASELINE · TOP · MIDDLE · BOTTOM | Where the block of lines sits in the texture. |
| size | Float | Text size in pixels, the same in every font. |
| lineHeight | Float | Line spacing. 1 is the font's own, 2 doubles it. |
| letterSpacing | Float | Extra space after each letter, as a fraction of size. |
| fillColor | Color4 | Colour of the letters. |
| backgroundColor | Color4 | Colour around the letters. |
| fitToText | Bool | Size the texture to the text. Off uses resolution. |
| padding | UInt32 | Empty pixels between the text and each edge. |
| resolution | Vector2UInt | Texture width and height in pixels, when not fitted. |
Examples
Scenes you can open in the editor that teach this node.
See also
This page is generated from the engine, so it describes the release you can download. The same text is in the editor's Help panel next to the node itself.