|
lxgui
|
A texture containing characters. More...
#include <gui_font.hpp>
Public Member Functions | |
| font ()=default | |
| Constructor. | |
| virtual | ~font ()=default |
| Destructor. | |
| virtual std::size_t | get_size () const =0 |
| Get the size of the font in pixels. | |
| virtual bounds2f | get_character_uvs (char32_t c) const =0 |
| Returns the uv coordinates of a character on the texture. | |
| virtual bounds2f | get_character_bounds (char32_t c) const =0 |
| Returns the rect coordinates of a character as it should be drawn relative to the baseline. | |
| virtual float | get_character_width (char32_t c) const =0 |
| Returns the width of a character in pixels. | |
| virtual float | get_character_height (char32_t c) const =0 |
| Returns the height of a character in pixels. | |
| virtual float | get_character_kerning (char32_t c1, char32_t c2) const =0 |
| Return the kerning amount between two characters. | |
| virtual std::weak_ptr< material > | get_texture () const =0 |
| Returns the underlying material to use for rendering. | |
| virtual void | update_texture (std::shared_ptr< material > mat)=0 |
| Update the 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::renderer.
Definition at line 22 of file gui_font.hpp.
|
default |
Constructor.
|
virtualdefault |
Destructor.
Reimplemented in lxgui::gui::gl::font.
|
pure virtual |
Returns the rect coordinates of a character as it should be drawn relative to the baseline.
| c | The unicode character |
Implemented in lxgui::gui::gl::font, lxgui::gui::sdl::font, and lxgui::gui::sfml::font.
|
pure virtual |
Returns the height of a character in pixels.
| c | The unicode character |
Implemented in lxgui::gui::gl::font, lxgui::gui::sdl::font, and lxgui::gui::sfml::font.
|
pure virtual |
Return the kerning amount between two characters.
| c1 | The first unicode character |
| c2 | The second unicode character |
Implemented in lxgui::gui::gl::font, lxgui::gui::sdl::font, and lxgui::gui::sfml::font.
|
pure virtual |
Returns the uv coordinates of a character on the texture.
| c | The unicode character |
Implemented in lxgui::gui::gl::font, lxgui::gui::sdl::font, and lxgui::gui::sfml::font.
|
pure virtual |
Returns the width of a character in pixels.
| c | The unicode character |
Implemented in lxgui::gui::gl::font, lxgui::gui::sdl::font, and lxgui::gui::sfml::font.
|
pure virtual |
Get the size of the font in pixels.
Implemented in lxgui::gui::gl::font, lxgui::gui::sdl::font, and lxgui::gui::sfml::font.
|
pure virtual |
Returns the underlying material to use for rendering.
Implemented in lxgui::gui::gl::font, lxgui::gui::sdl::font, and lxgui::gui::sfml::font.
|
pure virtual |
Update the material to use for rendering.
| mat | The material to use for rendering |
Implemented in lxgui::gui::gl::font, lxgui::gui::sdl::font, and lxgui::gui::sfml::font.