BMFont

Implementation for AngelCode BMFont.

Constructors

this
this(string textureFolder)

Creates a new BMFont instance with a textureFolder used as base path for texture loading

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Members

Functions

load
void load(string file, int sizeInPt)

Loads the font from a binary or text bmfont file.

measureText
vec2 measureText(string text, float scale = 1.0f)

Returns the dimensions of a string with this font.

measureTextMultiline
vec2 measureTextMultiline(string text, float scale = 1.0f)

Returns the dimensions of a multiline string with this font.

render
IText render(string text, float scale = 1.0f)

Renders a string to an IText.

renderMultiline
IText renderMultiline(string text, float scale = 1.0f)

Renders a multiline string to an IText.

Properties

handle
BM.Font handle [@property getter]

Handle to underlying bmfont.Font handle.

lineHeight
float lineHeight [@property getter]

Returns the line height of this font.

textures
Texture[] textures [@property getter]

All textures in the BMFont file

valid
bool valid [@property getter]

Returns true if font has been loaded.

Meta