Poison-ui

A cross-platform desktop/mobile UI engine written in D using dsfml

View project on GitHub

Dub version

poison.ui.fonts

Source

Module for fonts.

Authors:

  Jacob Jensen

License:

  https://github.com/PoisonEngine/poison-ui/blob/master/LICENSE

public:









public enum FontStyle


Enumeration of font styles.


normal = ""


Normal font style.


bold = "b"


Bold font style.


italic = "i"


Italic font style.


boldItalic = "z"


Bold & italic font style.


void loadFonts(string path);


Loads all fonts within a specific path.

Parameters:

pathThe path of the fonts.

public Font loadFont(string path);


Loads a font by its path or retrieves it from the font cache.

Parameters:

pathThe path of the font.

Note:

  If the path is specified as a font-name, it must be prefixed with its proper font-style suffix. Use retrieveFont for easier access.

Returns:

  The font loaded from its path or name.

public Font retrieveFont(string fontName, FontStyle style);


Retrieves a font by a name and style.

Parameters:

fontNameThe name of the font to retrieve.
styleThe style of the font.

Returns:

  The font retrieved by its name and style.

Generated by venom - Poison Engine's Documentation Generator