A texture containing characters. More...
#include <gui_font.hpp>
Public Member Functions | |
font () | |
Constructor. | |
virtual | ~font () |
Destructor. | |
virtual std::array< float, 4 > | get_character_uvs (uint uiChar) const =0 |
Returns the uv coordinates of a character on the texture. | |
virtual float | get_character_width (uint uiChar) const =0 |
Returns the width of a character in pixels. | |
virtual float | get_character_kerning (uint uiChar1, uint uiChar2) const =0 |
Return the kerning amount between two characters. | |
virtual utils::wptr< material > | get_texture () const =0 |
Returns the underlying material to use for rendering. |
A texture containing characters.
This class is purely virtual. It needs to be implemented and created by the corresponding gui::manager_impl.
Definition at line 20 of file gui_font.hpp.
gui::font::font | ( | ) |
Constructor.
Definition at line 5 of file gui_font.cpp.
gui::font::~font | ( | ) | [virtual] |
virtual float gui::font::get_character_kerning | ( | uint | uiChar1, | |
uint | uiChar2 | |||
) | const [pure virtual] |
Return the kerning amount between two characters.
uiChar1 | The first unicode character | |
uiChar2 | The second unicode character |
Implemented in gui::gl::font.
virtual std::array<float,4> gui::font::get_character_uvs | ( | uint | uiChar | ) | const [pure virtual] |
Returns the uv coordinates of a character on the texture.
uiChar | The unicode character |
Implemented in gui::gl::font.
virtual float gui::font::get_character_width | ( | uint | uiChar | ) | const [pure virtual] |
Returns the width of a character in pixels.
uiChar | The unicode character |
Implemented in gui::gl::font.
virtual utils::wptr<material> gui::font::get_texture | ( | ) | const [pure virtual] |
Returns the underlying material to use for rendering.
Implemented in gui::gl::font.