Back to Node List

Text Layout

text_layout

Resolves text into a reusable glyph layout without rasterizing it

Reviewed
Guide available
The node name and summary are available in English. Port, parameter, and article details are currently shown in Japanese.

Input Ports

NameTypeDescription
テキスト
text
Text
任意のテキスト入力。未接続時はテキストパラメータを使います。

Output Ports

NameTypeDescription
レイアウト
layout
TextLayout
後段の文字演出や画像化に使う構造化テキストレイアウト
文字数
character_count
Int
生成したレイアウトの文字数です(現在は glyph 数)

Parameters

NameTypeDefaultRangeDescription / Options
テキスト
text
Text
PixPipeline

Text 入力が未接続の時に使う文字列

フォント参照
source_mode
Enum
SystemFamily

文字レイアウトに使うフォントの参照方法

  • システムフォントSystemFamily
    この PC で使えるシステムフォントを使います
  • フォントファイルFontFile
    ローカルの TTF/OTF/TTC を一時読み込みしてすぐレイアウトを生成します
システムファミリ
system_family_name
Text
Segoe UI

システムフォントモードで使うファミリ名

フォントファイル
font_path
FilePath

ローカルの TTF / OTF / TTC ファイルパス

ファイル内ファミリ上書き
font_file_family_override
Text

コレクション用の任意ファミリ上書き。空欄ならフォントファイルから検出します。

フォールバック
fallback_family
Text
Arial

指定フォントを正確に解決できない時に使うフォールバックファミリ

文字サイズ
pixel_size
Int
244–256

ピクセル単位のフォントサイズ

字間
tracking
Int
0-16–64

文字ごとに追加する字間

行送り
line_height
Float
10.5–3 / step 0.05

フォントメトリクスに対する行送り倍率

揃え
align
Enum
Left

最長行から自動計算した幅の中で、短い行を横方向に揃えます

  • 左寄せLeft
  • 中央寄せCenter
  • 右寄せRight

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
Text Layout — PixPipeline Node Reference