]> git.localhorst.tv Git - blank.git/blobdiff - src/graphics/Font.hpp
set and display block type labels
[blank.git] / src / graphics / Font.hpp
index 2219452b86f8b71a11737402e508db5c2c802e4f..1d4ff17f619823b14efabe3fa8ac6a1a1452bee6 100644 (file)
@@ -11,6 +11,21 @@ class Texture;
 
 class Font {
 
+public:
+       enum FontStyle {
+               STYLE_NORMAL = TTF_STYLE_NORMAL,
+               STYLE_BOLD = TTF_STYLE_BOLD,
+               STYLE_ITALIC = TTF_STYLE_ITALIC,
+               STYLE_UNDERLINE = TTF_STYLE_UNDERLINE,
+               STYLE_STRIKE = TTF_STYLE_STRIKETHROUGH,
+       };
+       enum FontHinting {
+               HINT_NORMAL = TTF_HINTING_NORMAL,
+               HINT_LIGHT = TTF_HINTING_LIGHT,
+               HINT_MONO = TTF_HINTING_MONO,
+               HINT_NONE = TTF_HINTING_NONE,
+       };
+
 public:
        Font(const char *src, int size, long index = 0);
        ~Font();
@@ -22,6 +37,13 @@ public:
        Font &operator =(const Font &) = delete;
 
 public:
+       int Style() const noexcept;
+       void Style(int) const noexcept;
+       int Outline() const noexcept;
+       void Outline(int) noexcept;
+
+       int Hinting() const noexcept;
+       void Hinting(int) const noexcept;
        bool Kerning() const noexcept;
        void Kerning(bool) noexcept;
 
@@ -30,11 +52,15 @@ public:
        int Descent() const noexcept;
        int LineSkip() const noexcept;
 
+       const char *FamilyName() const noexcept;
+       const char *StyleName() const noexcept;
+
        bool HasGlyph(Uint16) const noexcept;
 
        glm::tvec2<int> TextSize(const char *) const;
 
        Texture Render(const char *, SDL_Color) const;
+       void Render(const char *, SDL_Color, Texture &) const;
 
 private:
        TTF_Font *handle;