String to Curves Node

../../../_images/modeling_geometry-nodes_text_string-to-curves_node.png

String to Curves node.

The String to Curves converts a string to curve instances. Each unique character used in the string is converted to a curve once, and further uses of that character are more instances of the same geometry.

This makes processing the output geometry very efficient, because each unique character only has to be processed once. However, it means that the result will be the same for every instance of the same character. To process each character individually, the Realize Instances Node can be used.

Tip

Socket inspection can be used to see the value of the string input used when the node was evaluated, by holding the mouse over the socket.

输入

字符串型

Standard string input.

尺寸

The size of each character. The values of the other inputs are scaled by this value.

字符间距

A factor by which the space between each character (kerning) is scaled on the X axis.

单词间距

A factor by which whitespace between words is scaled on the X axis.

行间距

The distance between separate lines in the output. Scaled by the Size input.

Max Width

Maximum width of the text, applies when the Overflow mode is set to Overflow.

Text Box Width

The maximum width of each line, though individual words will not be wrapped.

Text Box Height

The maximum height for all the lines of the text.

属性

字体

Font glyph used to generate the curve.

溢出
溢出

Allows the text to use more space than the specified height. The width of the output is still constrained by the Max Width input though.

Scale To Fit

Scales the text size to fit the width and height.

截短

Only outputs text characters that fit within the width and height, based on the Size input. Any part of the string that did not fit is moved to the Remainder output.

对齐
左键

Aligns the text to the left.

中心

Aligns the text to the center.

右键

Aligns the text to the right.

左右对齐

Aligns the text to the left and right.

分散对齐

Aligns the text to the left and right with equal character spacing.

Align Y
Top Baseline

Aligns the text to the top baseline.

Aligns the text to the top.

Middle

Aligns the text to the middle.

Bottom Baseline

Aligns the text to the bottom baseline.

底视图(行)

Aligns the text to the bottom.

轴心点

Controls where on each character the output Pivot Point is placed.

中点

Place the pivot points at the center of each character's bounds.

Top Left

Place the pivot points at the top left of each character's bounds.

Top Center

Place the pivot points at the middle of the top of each character's bounds.

Top Right

Place the pivot points at the top right of each character's bounds.

Bottom Left

Place the pivot points at the bottom left of each character's bounds.

Bottom Center

Place the pivot points at the middle of bottom of each character's bounds.

Bottom Right

Place the pivot points at the bottom right of each character's bounds.

输出

Curve Instances

Curve instances geometry.

Remainder

The part of the text that did not fit in the box described by the Text Box Height and Text Box Width inputs. Only used in the Truncate overflow mode.

线形

An attribute field containing which the index of the each character's line in the text layout (on the instance domain).

轴心点

Outputs the position described by the Pivot Point drop-down in the local space of each instance.

示例

../../../_images/modeling_geometry-nodes_text_string-to-curves_example.png

The node can be used to make overflowing text boxes. Here, the text that does not fit into the first node's fix-sized text box is passed to a separate String to Curves node. And finally added with a Scale to Fit node.