Skip to main content

vJSONTextFont

Convert text into outline points of a built-in vector font, with size, spacing, rotation and offset controls.

IntermediateMograph / JSONJSONArrayScriptVal
vJSONTextFont node

vJSONTextFont takes the text of its Styled Text control and outputs the outline points of each character, and a Groups output with the number of points in each outline. The outlines come from a vector font that is built into the Vonk Ultra modules.

Parameters​

ParameterTypeDefaultDescription
Styled TextText—Text to convert. It is changed to upper case.
SizeFloat1.0Scale of the text when Lock X/Y is on. Default 1.
Character SpacingFloat0.05Gap added after each character. Default 0.05.
Line SpacingFloat—Hidden control. Distance added for each space character, which works as word spacing.
Letter CaseDropdownORIGINALHidden control. It is not used, the text is always upper case.
+15 more parameters
ParameterTypeDefaultDescription
JustificationDropdownLeftHidden control. It is not used in the calculation.
Horizontal AdjustmentFloat0.0Value added to X of every point before rotation. Range -0.5 to 0.5.
Vertical AdjustmentFloat0.0Value added to Y of every point before rotation. Range -0.5 to 0.5.
X OffsetFloat—Offset in X, added after rotation and then scaled.
Y OffsetFloat—Offset in Y, added after rotation and then scaled.
Z OffsetFloat0.0Offset in Z, added after rotation and then scaled.
Rotation OrderDropdownXYZHidden control. It is not used, the rotation is always applied in X, Y, Z order.
X RotationFloat—Rotation around the X axis, in degrees.
Y RotationFloat—Rotation around the Y axis, in degrees.
Z RotationFloat—Rotation around the Z axis, in degrees.
Lock X/YInteger1When on, the scale comes from Size. When off, X Scale and Y Scale are used. Default on.
X ScaleFloat1.0Hidden while Lock X/Y is on. Scale in X, also used for Z, when Lock X/Y is off. Default 1.
Y ScaleFloat1.0Hidden while Lock X/Y is on. Scale in Y when Lock X/Y is off. Default 1.
X ShearFloat0.0Hidden control. It is not used in the calculation. Default 0.
Y ShearFloat0.0Hidden control. It is not used in the calculation. Default 0.
Read the full description

The text is converted to upper case, then each character is looked up in the built-in font. A space adds the Line Spacing value to the horizontal position, which makes that control the word spacing. Characters that are not in the font are skipped. Each other character is written as its outlines. Every outline is a list of points, and the next character starts at the right edge of the first outline plus Character Spacing.

The outline points are first mirrored in X and Y, which turns each glyph by 180 degrees. Then Horizontal Adjustment and Vertical Adjustment are added, the points are rotated by X, Y and Z Rotation with the rotation matrices multiplied in X, Y, Z order, and X, Y and Z Offset are added. The values are then multiplied by the scale. The scale is Size when Lock X/Y is on. When it is off, X Scale and Y Scale are used instead and Size has no effect.

The Output socket holds all outline points in order. The Groups socket holds one number for each outline, the count of its points, so a node that takes a Groups input can draw each outline as a separate closed shape. Rotation Order, Letter Case, Justification and the two Shear controls are hidden and are not used in the calculation.

The font is limited to the characters that its glyph tables contain, and the case is always upper case. The Z coordinate comes from the rotation, so without rotation it is 0.

Example Connections​

vJSONTextFont.Output -> vJSONCameraProjection.ArrayA
vJSONTextFont.ScriptVal_Groups -> vJSONCameraProjection.ArrayGroups
vJSONCameraProjection.Output -> vJSONShapeRender.ArrayPoint
vJSONCameraProjection.Groups -> vJSONShapeRender.ArrayGroups
Background.Output -> vJSONShapeRender.Input