![]() |
rag
graphic 2d engine
|
Font system based on bitmap fonts. More...
#include <BMPFont.h>
Public Member Functions | |
BMPFont (const std::string &path, const std::string &name) | |
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. | |
![]() | |
virtual void | setLetterSpacing (float value) |
virtual void | reloadTexture () |
Sets the extra space between characters. | |
Font system based on bitmap fonts.
This kind of fonts assumes the output generated with the AngelCode tool that can be found here: http://www.angelcode.com/products/bmfont/
BMPFont::BMPFont | ( | const std::string & | path, |
const std::string & | name | ||
) |
path | The path where the font descriptor file is. i.e., "assets/" |
name | The font descriptor file name. It is assumed that font descriptor and font texture are in the same folder. |