![]() |
rag
graphic 2d engine
|
Implementation of ITextFint based on TrueType or OpenType Fonts. More...
#include <TTFFont.h>
Public Member Functions | |
TTFFont (const std::string &path, float pixelHeight=24) | |
Constructs a TTFFont using a path and a text size. | |
virtual int | getWidth (const std::string &text) |
Returns the width of a text. | |
virtual void | print (const std::string &text, const glm::mat4 &matrix) |
Renders text. Asumes ortho projection 1:1 screen pixel. | |
virtual void | setLetterSpacing (float value) |
Sets the extra space between characters. | |
virtual void | reloadTexture () |
On context loss, reload textures. ITextFont should inherit Resource. Reload should be part of resource. | |
Static Public Member Functions | |
static void | addFontAlias (const std::string &alias, const std::string &fontPath) |
Allows to use a different name (or an 'alias') to refer to a font. | |
Implementation of ITextFint based on TrueType or OpenType Fonts.