#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; // Doesn't control sizes or anything, they are like this to be // compatible with sf::Font somehow. const sf::Texture *getTexture(...); float getLineSpacing(...); float getKerning(...); }; } #endif // GRAPHICS_FONT_H