1 #ifndef BLOBS_GRAPHICS_FONT_HPP_
2 #define BLOBS_GRAPHICS_FONT_HPP_
19 STYLE_NORMAL = TTF_STYLE_NORMAL,
20 STYLE_BOLD = TTF_STYLE_BOLD,
21 STYLE_ITALIC = TTF_STYLE_ITALIC,
22 STYLE_UNDERLINE = TTF_STYLE_UNDERLINE,
23 STYLE_STRIKE = TTF_STYLE_STRIKETHROUGH,
26 HINT_NORMAL = TTF_HINTING_NORMAL,
27 HINT_LIGHT = TTF_HINTING_LIGHT,
28 HINT_MONO = TTF_HINTING_MONO,
29 HINT_NONE = TTF_HINTING_NONE,
33 Font(const std::string &src, int size, long index = 0);
34 Font(const char *src, int size, long index = 0);
37 Font(Font &&) noexcept;
38 Font &operator =(Font &&) noexcept;
40 Font(const Font &) = delete;
41 Font &operator =(const Font &) = delete;
44 int Style() const noexcept;
45 void Style(int) const noexcept;
46 int Outline() const noexcept;
47 void Outline(int) noexcept;
49 int Hinting() const noexcept;
50 void Hinting(int) const noexcept;
51 bool Kerning() const noexcept;
52 void Kerning(bool) noexcept;
54 int Height() const noexcept;
55 int Ascent() const noexcept;
56 int Descent() const noexcept;
57 int LineSkip() const noexcept;
59 const char *FamilyName() const noexcept;
60 const char *StyleName() const noexcept;
62 bool HasGlyph(Uint16) const noexcept;
64 glm::ivec2 TextSize(const char *) const;
65 glm::ivec2 TextSize(const std::string &) const;
67 Texture Render(const char *) const;
68 Texture Render(const std::string &) const;
69 void Render(const char *, Texture &) const;
70 void Render(const std::string &, Texture &) const;