Nymph Game Engine
Chaiscript based Game Engine
|
Class for font generator. More...
#include <font_generator.h>
Public Member Functions | |
FontGenerator (const std::string &font_path="", const unsigned int pixels_per_unit=32) | |
Font generator constructor. More... | |
~FontGenerator () | |
Destroys the font generator. More... | |
void | setFontPath (const std::string &font_path) noexcept |
Sets the font path. More... | |
std::string | getFontPath () const noexcept |
Gets the font path. More... | |
void | loadFont (const std::string &ttf_file, const unsigned int size, const std::string &name="") |
Loads a font. More... | |
std::shared_ptr< Font > | getFont (const std::string &name) const noexcept |
Gets the font. More... | |
Class for font generator.
Graphics::UI::FontGenerator::FontGenerator | ( | const std::string & | font_path = "" , |
const unsigned int | pixels_per_unit = 32 |
||
) |
Font generator constructor.
[in] | font_path | The font path |
[in] | pixels_per_unit | The pixels per unit |
Graphics::UI::FontGenerator::~FontGenerator | ( | ) |
Destroys the font generator.
|
noexcept |
Gets the font.
[in] | name | The name |
Referenced by generated::getFontGeneratorModule().
|
noexcept |
void Graphics::UI::FontGenerator::loadFont | ( | const std::string & | ttf_file, |
const unsigned int | size, | ||
const std::string & | name = "" |
||
) |
Loads a font.
[in] | ttf_file | The ttf file |
[in] | size | The size |
[in] | name | The name |
References Graphics::VertexData::addIndices(), Graphics::VertexData::addVec(), and Graphics::VertexData::generateVertexArrayObject().
Referenced by generated::getFontGeneratorModule().
|
noexcept |
Sets the font path.
[in] | font_path | The font path |
Referenced by generated::getFontGeneratorModule().