1 #ifndef LXGUI_GUI_FONT_HPP
2 #define LXGUI_GUI_FONT_HPP
4 #include "lxgui/gui_bounds2.hpp"
5 #include "lxgui/gui_code_point_range.hpp"
6 #include "lxgui/gui_vector2.hpp"
7 #include "lxgui/lxgui.hpp"
8 #include "lxgui/utils.hpp"
A texture containing characters.
virtual ~font()=default
Destructor.
virtual bounds2f get_character_uvs(char32_t c) const =0
Returns the uv coordinates of a character on the texture.
virtual float get_character_kerning(char32_t c1, char32_t c2) const =0
Return the kerning amount between two characters.
virtual float get_character_height(char32_t c) const =0
Returns the height of a character in pixels.
font()=default
Constructor.
virtual std::size_t get_size() const =0
Get the size of the font in pixels.
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 void update_texture(std::shared_ptr< material > mat)=0
Update the material to use for rendering.
virtual std::weak_ptr< material > get_texture() const =0
Returns the underlying material to use for rendering.
virtual float get_character_width(char32_t c) const =0
Returns the width of a character in pixels.