Font

Class for loading and manipulating character fonts.

Constructors

this
this()

Default constructor.

Destructor

~this
~this()

Destructor.

Members

Functions

getGlyph
Glyph getGlyph(dchar codePoint, uint characterSize, bool bold)

Retrieve a glyph of the font.

getKerning
float getKerning(dchar first, dchar second, uint characterSize)

Get the kerning offset of two glyphs.

getLineSpacing
float getLineSpacing(uint characterSize)

Get the line spacing.

getTexture
const(Texture) getTexture(uint characterSize)

Retrieve the texture containing the loaded glyphs of a certain size.

getUnderlinePosition
float getUnderlinePosition(uint characterSize)

Get the position of the underline.

getUnderlineThickness
float getUnderlineThickness(uint characterSize)

Get the thickness of the underline.

loadFromFile
bool loadFromFile(const(char)[] filename)

Load the font from a file.

loadFromMemory
bool loadFromMemory(const(void)[] data)

Load the font from a file in memory.

loadFromStream
bool loadFromStream(InputStream stream)

Load the font from a custom stream.

Properties

dup
Font dup [@property getter]

Performs a deep copy on the font.

Structs

Info
struct Info

Holds various information about a font.

Meta