TTFFont

Implementation for SDL_ttf.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

dispose
void dispose()

Deallocates memory and invalidates this.

load
void load(string file, int sizeInPt)

Loads the font from a 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
TTF_Font* handle [@property getter]

Handle to underlying TTF_Font* handle.

lineHeight
float lineHeight [@property getter]

Returns the line height of this font.

valid
bool valid [@property getter]

Returns if _handle is not null.

Meta