Etermal
Embeddable Terminal and shell for OpenGL
|
Takes care of rendering codepoints and binding their textures. More...
#include <Font.h>
Public Member Functions | |
Font (const std::string &path) | |
Construct a Font. More... | |
Font (Font &&other) | |
Initialize with moved object. More... | |
~Font () | |
Destruct Font. More... | |
Font & | operator= (Font &&other) |
Assign to moved object. More... | |
void | setResMan (Resources *res) override |
void | setSize (unsigned int size) override |
Set the pixel size of the font. More... | |
void | bindChar (char_t c) override |
Binds the given codepoint's texture to the currently active OpenGL texture slot. More... | |
void | clearCache () override |
Clears the codepoint texture cache. | |
int | getCharWidth () override |
Gets the width of each codepoint. More... | |
int | getCharHeight () override |
Gets the height of each codepoint. More... | |
Additional Inherited Members | |
Public Types inherited from etm::EtmFont | |
typedef unsigned int | char_t |
Codepoint type. | |
Takes care of rendering codepoints and binding their textures.
Works with a cache to save run time.
etm::Font::Font | ( | const std::string & | path | ) |
Construct a Font.
Contains a root font library object, which is a good and bad thing.
[in] | path | The path to the font resource |
std::logic_error | if failed to create freetype library |
std::invalid_argument | if failed to create font face from given path |
etm::Font::Font | ( | Font && | other | ) |
Initialize with moved object.
[in,out] | other | Moved object |
etm::Font::~Font | ( | ) |
Destruct Font.
If the lib
parameter that was given to it upon construction is deleted, then undefined behavior is invoked (IIRC).
|
overridevirtual |
Binds the given codepoint's texture to the currently active OpenGL texture slot.
[in] | c | The codepoint to bind |
Implements etm::EtmFont.
|
overridevirtual |
|
overridevirtual |
Assign to moved object.
[in,out] | other | Moved object |
|
overridevirtual |