SDLFont

SDL_ttf loaded font wrapper.

Constructors

this
this(SDLTTF sdlttf, string filename, int ptSize)

Loads a font from a file.

Destructor

~this
~this()

Releases the SDL resource.

Members

Functions

ascent
int ascent()
descent
int descent()
getKerning
bool getKerning()
height
int height()
hinting
int hinting()
lineSkip
int lineSkip()
measureText
SDL_Point measureText(string text)
outline
int outline()
renderGlyphBlended
SDL2Surface renderGlyphBlended(dchar ch, SDL_Color color)

Create a 32-bit ARGB surface and render the given character at high quality, using alpha blending to dither the font with the given color.

renderTextBlended
SDL2Surface renderTextBlended(string text, SDL_Color color)

Create a 32-bit ARGB surface and render the given text at high quality, using alpha blending to dither the font with the given color.

renderTextBlendedWrapped
SDL2Surface renderTextBlendedWrapped(string text, SDL_Color color, uint wrapLength)

Create a 32-bit ARGB surface and render the given text at high quality, using alpha blending to dither the font with the given color. Uses multi-line text wrapping.

renderTextShaded
SDL2Surface renderTextShaded(string text, SDL_Color fg, SDL_Color bg)

Create an 8-bit palettized surface and render the given text at high quality with the given font and colors.

renderTextSolid
SDL2Surface renderTextSolid(string text, SDL_Color color)

Create an 8-bit palettized surface and render the given text at fast quality with the given font and color.

setHinting
int setHinting(int newHinting)

Set font hinting.

setKerning
bool setKerning(bool enabled)

Enables/Disables font kerning.

setOutline
int setOutline(int newOutline)

Set font outline.

setStyle
int setStyle(int newStyle)

Set font style.

style
int style()

Meta