25 #ifndef GRAPHICS_FONT_H 26 #define GRAPHICS_FONT_H 30 #include "glm/mat4x4.hpp" 73 float maxWidth = 0.0f,
float maxHeight = 0.0f,
bool trim =
true)
const;
74 float split(
Common::UString &line,
float maxWidth,
float maxHeight = 0.0f,
bool trim =
true)
const;
83 #endif // GRAPHICS_FONT_H
A class holding an UTF-8 string.
virtual void draw(uint32 c) const =0
Draw this character.
float getLineWidth(const Common::UString &text) const
Return the width of this string.
virtual float getLineSpacing() const
Return the size of space between lines.
size_t getLineCount(const Common::UString &text, float maxWidth=0.0f, float maxHeight=0.0f) const
Return the number of lines this text spans.
float split(const Common::UString &line, std::vector< Common::UString > &lines, float maxWidth=0.0f, float maxHeight=0.0f, bool trim=true) const
bool addLine(std::vector< Common::UString > &lines, const Common::UString &newLine, float maxHeight) const
virtual void renderBind(const glm::mat4 &transform) const
virtual void buildChars(const Common::UString &str)
Build all necessary characters to display this string.
virtual float getHeight() const =0
Return the height of a character.
virtual float getWidth(uint32 c) const =0
Return the width of a character.
virtual void renderUnbind() const
virtual void render(uint32 c, float &x, float &y, float *rgba) const