Text
Creates a typographic layout object with font, size, alignment, and wrapping. Outputs TextData for rendering or conversion to shapes.
Category: Text Menu path: Text > Text
Ports
| Port | Type | Direction | Description |
|---|---|---|---|
content_in | string | input | Overrides the literal text param when connected. Chain a String or MergeText node here to drive the content from elsewhere (animated captions, AI prompts, etc). |
out | text | output | TextData carrying content, font params, and computed glyph layout |
width | scalar | output | Computed text bounding width in pixels |
height | scalar | output | Computed text bounding height in pixels |
lineCount | scalar | output | Number of lines in the layout |
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
text | string | Hello | Text content (supports multi-line). Keyframeable with Hold interpolation — animate caption swaps directly on the node, or pipe in a String at content_in to drive from elsewhere. |
fontFamily | string | Helvetica Neue | System font family |
fontWeight | enum | Regular | Thin, ExtraLight, Light, Regular, Medium, SemiBold, Bold, ExtraBold, Black |
fontStyle | enum | Normal | Normal or Italic |
fontSize | scalar | 72 | Font size in pixels |
tracking | scalar | 0 | Letter spacing adjustment in font units |
lineHeight | scalar | 1.2 | Line height multiplier |
alignment | enum | Center | Left, Center, or Right |
wrapping | enum | None | None (point text) or WordWrap (box text) |
boxWidth | scalar | 0 | Text box width (0 = no box constraint) |
boxHeight | scalar | 0 | Text box height (0 = no box constraint) |
Expose Channels
When enabled (E button on node header), adds input ports that override params via edge connections:
| Port | Type | Overrides |
|---|---|---|
fontSize_in | scalar | fontSize |
tracking_in | scalar | tracking |
lineHeight_in | scalar | lineHeight |
boxSize_in | vec2 | boxWidth and boxHeight |
How It Works
The Text node computes a full typographic layout using the engine's font stack (fontdb for enumeration, ttf-parser for parsing, rustybuzz for OpenType shaping). The output TextData carries both the input parameters and the computed glyph positions, cluster information, and line metrics.
Point text (wrapping: None): Text flows on a single line (or multiple lines from explicit line breaks). No width constraint.
Box text (wrapping: WordWrap, boxWidth > 0): Text wraps within the specified box dimensions. Layout is centered within the box when both boxWidth and boxHeight are set.
The Text node does not render pixels -- it produces layout data. Connect to DrawText for rasterization, TextAnimate for per-glyph animation, or TextToShape for outline conversion.
The scalar outputs (width, height, lineCount) are useful for driving other parameters. For example, feed width into a Rectangle node to create a background that auto-sizes to the text.
Usage Examples
Basic: Rendered text
Text (text: "Hello World", fontSize: 96) -> DrawText -> Transform2D -> Output. Standard text rendering pipeline.
Animated text reveal
Text -> TextAnimate (progress: keyframed 0 to 1) -> DrawText -> Transform2D -> Output. Characters animate in one by one.
Auto-sized background
Text -> DrawText -> Transform2D -> Output. Also: Text.width and Text.height -> Math nodes (with padding) -> Rectangle (width/height driven) -> DrawShape -> Transform2D -> Output on a layer below.
Text as geometry
Text -> TextToShape -> ShapeAttributes (Color from Gradient.colorField) -> DrawShape -> Transform2D -> Output. Text outlines filled with a gradient.
Tips
- Use the Text tool (T key) to create text interactively -- click for point text, drag for box text
- Double-click a text layer to enter text editing mode with caret and selection
- The font picker in Properties offers searchable font families with CSS preview
- Safety clamping prevents NaN/Inf from extreme parameter values
- The
textport type is distinct -- it cannot connect directly to image or shape ports
Related Nodes
- DrawText -- rasterizes TextData to a texture
- TextAnimate -- per-glyph geometric animation
- TextToShape -- converts glyph outlines to shape data
- DrawAscii -- ASCII art rendering (different approach to text)