A texture containing characters. More...
#include <gui_gl_font.hpp>
Public Member Functions | |
| font (const std::string &sFontFile, uint uiSize) | |
| Constructor. | |
| ~font () | |
| Destructor. | |
| std::array< float, 4 > | get_character_uvs (uint uiChar) const |
| Returns the uv coordinates of a character on the texture. | |
| float | get_character_width (uint uiChar) const |
| Returns the width of a character in pixels. | |
| float | get_character_kerning (uint uiChar1, uint uiChar2) const |
| Return the kerning amount between two characters. | |
| utils::wptr< gui::material > | get_texture () const |
| Returns the underlying material to use for rendering. | |
A texture containing characters.
This is the OpenGL implementation of the gui::font. It uses the freetype library to read data from .ttf and .otf files and to render the characters on the font texture.
Definition at line 28 of file gui_gl_font.hpp.
| gui::gl::font::font | ( | const std::string & | sFontFile, | |
| uint | uiSize | |||
| ) |
Constructor.
| sFontFile | The name of the font file to read | |
| uiSize | The requested size in pixels of the font |
Definition at line 15 of file gui_gl_font.cpp.
| gui::gl::font::~font | ( | ) | [virtual] |
| float gui::gl::font::get_character_kerning | ( | uint | uiChar1, | |
| uint | uiChar2 | |||
| ) | const [virtual] |
Return the kerning amount between two characters.
| uiChar1 | The first unicode character | |
| uiChar2 | The second unicode character |
Implements gui::font.
Definition at line 204 of file gui_gl_font.cpp.
| std::array< float, 4 > gui::gl::font::get_character_uvs | ( | uint | uiChar | ) | const [virtual] |
Returns the uv coordinates of a character on the texture.
| uiChar | The unicode character |
Implements gui::font.
Definition at line 192 of file gui_gl_font.cpp.
| float gui::gl::font::get_character_width | ( | uint | uiChar | ) | const [virtual] |
Returns the width of a character in pixels.
| uiChar | The unicode character |
Implements gui::font.
Definition at line 198 of file gui_gl_font.cpp.
| utils::wptr< gui::material > gui::gl::font::get_texture | ( | ) | const [virtual] |
Returns the underlying material to use for rendering.
Implements gui::font.
Definition at line 212 of file gui_gl_font.cpp.
1.6.1