8#ifndef GALAXY_GRAPHICS_TEXT_FONT_HPP_
9#define GALAXY_GRAPHICS_TEXT_FONT_HPP_
13#include <glm/vec2.hpp>
55 bool load(
const std::string& file);
66 bool load(
unsigned char* buffer,
const unsigned int size);
96 glm::vec2
get_text_size(
const std::string& text,
const float size);
A font is a MSDF atlas of glyphs.
Font & operator=(Font &&)
Move assignment operator.
msdfgl_font_t handle()
Get handle to internal font object.
msdfgl_font_t m_font
Font object.
void build()
Build the font atlas.
bool load(const std::string &file)
Loads the font and sets up characters.
FT_Face m_face
Freetype face.
glm::vec2 get_text_size(const std::string &text, const float size)
Query text size with font.
float vertical_advance(const float size) const
Get vertical advance for drawing multiline text.