/* * Rick van Vonderen * 0945444 * TI2B */ #ifndef FONT_H #define FONT_H #include // map #include // string #include // unordered_map #include #include FT_FREETYPE_H #include struct Character { unsigned int texture; // ID glm::ivec2 size; // Width / height glm::ivec2 bearing; // Offset from baseline to left/top of glyph unsigned int advance; // Offset to advance to next glyph }; class FontManager { public: FT_Face loadFont(const std::string &path); // ----------------------------------------- Character character(const char character) const; const std::map &characterList() const; private: std::unordered_map m_fontList; std::map m_characterList; }; extern FontManager *g_fontManager; #endif // FONT_H