Font

Create a set of Shapes representing a font loaded in JSON format.

This is used internally by the FontLoader.

Examples

geometry / text / shapes
vector / text

Constructor

Font(data)

data -- JSON data representing the font.

This constructor creates a new Font, which is an array of Shapes.

Properties

.data : array

The JSON data passed in the constructor.

.isFont : Boolean

Used to check whether this or derived classes are fonts. Default is true.

You should not change this, as it used internally by the renderer for optimisation.

Methods

.generateShapes (text : String, size : Float) : null

text -- string of text.
size -- (optional) scale for the Shapes. Default is 100.
Creates an array of Shapes representing the text in the font.

Source

For more info on how to obtain the source code of this module see this page.