48 std::map<char, Character> characters;
50 unsigned int pixels_per_unit;
58 Font(
const unsigned int size = 12,
const unsigned int pixels_per_unit = 32);
87 unsigned int getSize()
const noexcept;
void addCharacter(const char text_char, const Character &character)
Adds a character.
Definition: font.cpp:9
unsigned int texture_handle
Definition: font.h:19
Character getCharacter(const char text_char)
Gets the character.
Definition: font.cpp:13
Font(const unsigned int size=12, const unsigned int pixels_per_unit=32)
Font constructor.
Definition: font.cpp:5
float advance
Definition: font.h:31
Class for vertex data.
Definition: vertex_data.h:17
VertexData vertex_data
Definition: font.h:35
glm::vec2 position
Definition: font.h:23
std::map< char, Character > getCharacters() const
Gets the characters.
Definition: font.cpp:17
unsigned int getSize() const noexcept
Gets the size.
Definition: font.cpp:21
glm::vec2 size
Definition: font.h:27
unsigned int vertex_array_object
Definition: font.h:39
float getOpenGLSize() const noexcept
Gets the open gl size.
Definition: font.cpp:25
Class for font.
Definition: font.h:46
Struct holding font character information.
Definition: font.h:13