Api - Text Class
Hierarchy
- Text
Implements
Index
Constructors
constructor
-
Parameters
-
font: Font
OpenType.Font object.
-
text: string
String of text to render.
-
fontSize: number
Font size.
-
Default value combine: boolean = false
Flag (default false) to perform a combineUnion upon each character with characters to the left and right.
-
Default value centerCharacterOrigin: boolean = false
Flag (default false) to move the x origin of each character to the center. Useful for rotating text characters.
-
Optional bezierAccuracy: number
Optional accuracy of Bezier curves.
-
Optional opentypeOptions: RenderOptions
Optional opentype.RenderOptions object.
Returns Text
Model of the text.
-
Properties
models
Methods
Static glyphToModel
-
Convert an opentype glyph to a model.
Parameters
-
glyph: Glyph
Opentype.Glyph object.
-
fontSize: number
Font size.
-
Optional bezierAccuracy: number
Optional accuracy of Bezier curves.
Returns IModel
Model of the glyph.
-
Generated using TypeDoc
Renders text in a given font to a model.