# FontRenderer

### `width(text): Number`

<table><thead><tr><th width="125">Argument</th><th width="391">Type</th><th width="235">Description</th></tr></thead><tbody><tr><td><code>text</code></td><td><code>String</code></td><td>Text to calculate the width of.</td></tr></tbody></table>

Returns the text width.

### `height(): Number`

Returns the font height.

### `draw(text, x, y, color): Undefined`

### `drawCentered(text, x, y, color): Undefined`

### `drawWithShadow(text, x, y, color): Undefined`

### `drawCenteredWithShadow(text, x, y, color): Undefined`

<table><thead><tr><th width="125">Argument</th><th width="371">Type</th><th width="235">Description</th></tr></thead><tbody><tr><td><code>text</code></td><td><code>String</code></td><td>Text to draw.</td></tr><tr><td><code>x</code></td><td><code>Number</code></td><td>X position of the string to draw.</td></tr><tr><td><code>y</code></td><td><code>Number</code></td><td>Y position of the string to draw.</td></tr><tr><td><code>color</code></td><td><code>Number[]</code></td><td>4-element array with the RGBA color to use. Example: [255, 255, 255, 255] would translate to a white color. <strong>You are not required to provide the alpha.</strong></td></tr></tbody></table>

Renders a string. The function name speaks for itself.
