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

~this
~this()
Undocumented in source.

Members

Functions

dispose
void dispose()
Undocumented in source. Be warned that the author may not have intended to support it.
load
void load(string file, int sizeInPt)

Loads the font from a binary or text bmfont file.

measureText
vec2 measureText(string text, float scale)

Returns the dimensions of a string with this font.

measureTextMultiline
vec2 measureTextMultiline(string text, float scale)

Returns the dimensions of a multiline string with this font.

render
IText render(string text, float scale)

Renders a string to an IText.

renderMultiline
IText renderMultiline(string text, float scale)

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