Font

Class for loading and manipulating character fonts.

Constructors

this
this()

Default constructor.

this
this(sfFont* newFont)
Undocumented in source.

Destructor

~this
~this()

Destructor.

Members

Functions

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

Retrieve a glyph of the font.

getInfo
const(Info) getInfo()

Load the font from a custom stream.

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.

Properties

dup
Font dup [@property getter]

Performs a deep copy on the font.

Structs

Info
struct Info

Holds various information about a font.

Variables

sfPtr
sfFont* sfPtr;
Undocumented in source.

Meta