diff options
Diffstat (limited to 'plugingui/font.h')
-rw-r--r-- | plugingui/font.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/plugingui/font.h b/plugingui/font.h index d350481..e29528d 100644 --- a/plugingui/font.h +++ b/plugingui/font.h @@ -41,19 +41,24 @@ public: size_t textWidth(const std::string& text) const; size_t textHeight(const std::string& text = "") const; + void setLetterSpacing(int letterSpacing); + int letterSpacing() const; + PixelBufferAlpha *render(const std::string& text) const; private: Image img_font; - struct Character { - int offset = 0; - size_t width = 0; - int pre_bias = 0; - int post_bias = 0; + class Character { + public: + int offset{0}; + size_t width{0}; + int pre_bias{0}; + int post_bias{0}; }; std::array<Character, 255> characters; + int spacing{1}; }; } // GUI:: |