# [name]

A class for text operations in three.js (See [page:TextGeometry])

## Properties

### [property:number divisions]

The amount of segments in a curve. Default is 10.

### [property:string style]

The style of the used font. Default is "normal".

### [property:string weight]

The weight of the used font. Default is "normal".

### [property:string face]

The name of the font. Default is "helvetiker".

### [property:object faces]

All Fonts which are already loaded in.

### [property:number size]

The size of the used Font. Default is 150.

## Methods

### [method:Object drawText]([page:string text])

text -- The text to draw.
Calculates the path and offset of the text in the used font. It returns an object like { paths : fontPaths, offset : width }.

### [method:Array Triangulate]([page:Array contour], [page:Boolean indices])

contour -- Array of vector2 to define an contour
indices -- A boolean indicating if you need to return indices.
Triangulates a contour into an array of faces.

### [method:Object extractGlyphPoints]([page:string c], [page:string face], [page:number scale], [page:number offset], [page:Path path])

c -- The character to extract.
face -- The face to use.
scale -- The scale of the character.
offset -- The offset of the character compared to begin of the path.
path -- The path to which to add the character points.
This ectracts the glyphPoints of the character of the face and returns an object containing the path and the new offset.

### [method:Array generateShapes]([page:string text], [page:Object parameters])

text -- The text to generate the shapes from.
parameters -- The parameter containing
size -- Default is 100. curveSegments -- Default is 4. font -- Default is "helvetiker". weight -- Default is "normal". style -- Default is "normal".
Generates shapes from the text and return them as an Array of [page:Shape].

### [method:Object loadFace]([page:Object data])

data -- The data of the face.
This loads and saves the data of the face and return the data. When you add the font Data as javascriptfile, then this automatically get called. So there is no need to do this yourself.

### [method:Object getFace]()

Returns the used font its data based on its style and weight.

## Source

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]