]> git.localhorst.tv Git - blobs.git/blobdiff - src/graphics/Font.hpp
basic info box
[blobs.git] / src / graphics / Font.hpp
index ce9cfd9248cbe4c03a56e3428c67d6dc4817f568..6088d95b70a96f609899596ff2a8d6e84e5dd9cc 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "glm.hpp"
 
+#include <string>
 #include <SDL_ttf.h>
 
 
@@ -29,6 +30,7 @@ public:
        };
 
 public:
+       Font(const std::string &src, int size, long index = 0);
        Font(const char *src, int size, long index = 0);
        ~Font();
 
@@ -60,9 +62,12 @@ public:
        bool HasGlyph(Uint16) const noexcept;
 
        glm::ivec2 TextSize(const char *) const;
+       glm::ivec2 TextSize(const std::string &) const;
 
        Texture Render(const char *) const;
+       Texture Render(const std::string &) const;
        void Render(const char *, Texture &) const;
+       void Render(const std::string &, Texture &) const;
 
 private:
        TTF_Font *handle;