#ifndef GRAPHICS_FONT_H #define GRAPHICS_FONT_H #include #include #include namespace Graphics { class TextureFont { public: struct Descr { std::string mapping; unsigned int numrows, numcols; }; private: using GlyphTable = std::map; GlyphTable glyphTable_; const sf::Texture &tex_; const Descr description_; sf::Vector2i glyphSize_; public: TextureFont(const sf::Texture &texture, Descr desc); const sf::Glyph &getGlyph(char ch) const; const sf::Texture *getTexture(unsigned int _); }; } #endif // GRAPHICS_FONT_H