Studio Yotsuba
Back to Node List

Text Layout

text_layout

Resolves text into a reusable glyph layout without rasterizing it

Reviewed
Guide available

Input Ports

NameTypeDescription
Text
text
Text
Optional text input. Falls back to the text parameter when not connected.

Output Ports

NameTypeDescription
Layout
layout
TextLayout
Structured glyph layout for downstream text effects and rasterization
Character Count
character_count
Int
Character count of the generated layout (currently the glyph count)

Parameters

NameTypeDefaultRangeDescription / Options
Text
text
Text
PixPipeline—

Fallback text used when the Text input is not connected

Source Mode
source_mode
Enum
SystemFamily—

How the font is resolved for layout

  • SystemFamilySystemFamily
    Use a font family already available on this PC
  • FontFileFontFile
    Load a local TTF/OTF/TTC file for this process and build a layout immediately
System Family
system_family_name
Text
Segoe UI—

Font family used in System Family mode

Font File
font_path
FilePath
——

Local TTF / OTF / TTC file path

Font File Family Override
font_file_family_override
Text
——

Optional family override for collections; leave empty to use the family detected from the font file

Fallback Family
fallback_family
Text
Arial—

Fallback family used when the requested font cannot be resolved exactly

Pixel Size
pixel_size
Int
244–256

Font size in pixels

Tracking
tracking
Int
0-16–64

Additional pixel spacing between glyphs

Line Height
line_height
Float
10.5–3 / step 0.05

Line height multiplier based on the font metrics

Align
align
Enum
Left—

Align shorter lines within the auto-sized width of the longest line

  • LeftLeft
  • CenterCenter
  • RightRight

Overview

Converts a string into character-placement data (TextLayout) before rasterization. Because downstream nodes receive positions for individual characters, you can insert per-character effects (reveal one character at a time, wave animation) before turning the result into an image.

Usage tips

  • To draw static text, connect directly to text_rasterize. This node is needed when you want to animate individual characters: text_layout → text_reveal_by_glyph / text_animate_by_glyph → text_rasterize.
  • Specify a system font name or a local ttf/otf file. For pixel art, a font_path to a bitmap-style font produces a clean result.
  • system_family_name and font_file_family_override are stored separately. Normally leave the file override empty so the family is detected from the selected font file; use it only to select a specific family in a collection.
  • align positions shorter lines within the width of the longest line. Its effect is therefore mainly visible on multiline text; a single auto-sized line has no spare width.
  • The character_count output is useful for calculating progress per character when timing a type-on effect.

Related nodes

  • text_input — source of the text
  • text_reveal_by_glyph / text_animate_by_glyph — per-character effects (the main purpose of this node)
  • text_rasterize — final rasterization
  • text_outline — outline the text

Technical details

  • TextLayout is a wire-only formal type and cannot be created directly in the Variables panel.
  • It does not retain font binaries, only the font reference and layout result.
  • Glyph units are currently Unicode scalar values based on Rust text.chars().
  • character_count currently outputs glyphs.len() directly as an Int.
  • It has no color, antialiasing, or padding; downstream Text Rasterize v2 handles those.

Debug display

  • The Inspector shows a Text Layout (Debug) section.
  • It displays the index and bounding box of each glyph.
  • Results from TextRevealByGlyph and TextAnimateByGlyph are also TextLayout outputs and appear in the same display.
  • translate and scale appear using approximate bounding boxes for debugging.

Examples

[Text Input] -> [Text Layout] -> [Text Rasterize v2]
[Text Input] -> [Text Layout] -> [Text Reveal By Glyph]
[Text Input] -> [Text Layout]
                    └-> [Character Count] -> [Divide] -> [Progress per Character]
Back to Node List