Font

Font is the low-level class for loading and manipulating character fonts. This class is meant to be used by Dgame.Graphics.Text.

Constructors

this
this(string filename, ubyte size, Mode mode, Style style)

CTor

Destructor

~this
~this()

DTor

Postblit

this(this)
this(this)

Postblit

Members

Enums

Hint
enum Hint

Font Hints

Mode
enum Mode

Font mode

Style
enum Style

Font styles

Functions

free
void free()

Close and release the current font <b>and all</b> which are linked to this Font.

getHint
Hint getHint()

Returns the current hint

getMode
Mode getMode()

Returns the current font mode.

getSize
ubyte getSize()

Returns the current font size.

getStyle
Style getStyle()

Returns the current font style.

loadFromFile
void loadFromFile(string fontFile, ubyte fontSize)

Load the font from a file. If the second parameter isn't 0, the current font size will be replaced with that. If both are 0, an exception is thrown.

setHint
void setHint(Hint hint)

Set a hint for the Font

setMode
void setMode(Mode mode)

Set the font mode.

setStyle
void setStyle(Style style)

Set the font style.

useCount
int useCount()

Returns the current use count

Properties

filename
string filename [@property getter]

Returns the current filename, if any

ptr
inout(TTF_Font)* ptr [@property getter]

Returns a TTFthis._target pointer.

Meta

Authors

rschuett