Returns a new immutable VectorText that snapshots the current builder state. The builder remains usable afterward; the returned text run is an independent snapshot.
StaticcreateCreates a builder for a text run with the given text content and font
size. Throws if size is not greater than 0, or if size is not finite.
The text content (String).
The font size (Number, must be > 0), in canvas pixels.
StaticgetReturns the name of this object's type.
Returns true if the object matches or derives from the passed in type.
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Sets the HorizontalAlignment — where this run sits relative to its baseline position. Defaults to Left (the SVG start default).
The horizontal anchor.
A mutable builder for an immutable VectorText run. Start one with VectorTextBuilder.create, optionally refine with VectorTextBuilder#setWeight, VectorTextBuilder#setItalic, VectorTextBuilder#setLetterSpacing, and VectorTextBuilder#setHorizontalAlignment, then call VectorTextBuilder#build to produce the text run. The builder remains usable after
build(). The font is the composite's font source (see VectorCompositeBuilder#setFontSource), not a per-run family.Since
Lens Scripting Version 374
Snap OS
Example