#ifndef FONT_H #define FONT_H #include #include #include "Glyph.h" class Font { public: bool load(const char * fname, int size); std::shared_ptr get_glyph(FT_ULong character); int get_advance() { return m_advance; } int get_line_height() { return m_line_height; } int get_baseline_offset() { return m_baseline_offset; } protected: bool preload_glyphs(); FT_Face m_face; std::unordered_map> m_glyphs; int m_advance; int m_line_height; int m_baseline_offset; }; #endif