1 #ifndef GONG_GRAPHICS_FONT_HPP_
2 #define GONG_GRAPHICS_FONT_HPP_
18 STYLE_NORMAL = TTF_STYLE_NORMAL,
19 STYLE_BOLD = TTF_STYLE_BOLD,
20 STYLE_ITALIC = TTF_STYLE_ITALIC,
21 STYLE_UNDERLINE = TTF_STYLE_UNDERLINE,
22 STYLE_STRIKE = TTF_STYLE_STRIKETHROUGH,
25 HINT_NORMAL = TTF_HINTING_NORMAL,
26 HINT_LIGHT = TTF_HINTING_LIGHT,
27 HINT_MONO = TTF_HINTING_MONO,
28 HINT_NONE = TTF_HINTING_NONE,
32 Font(const char *src, int size, long index = 0);
35 Font(Font &&) noexcept;
36 Font &operator =(Font &&) noexcept;
38 Font(const Font &) = delete;
39 Font &operator =(const Font &) = delete;
42 int Style() const noexcept;
43 void Style(int) const noexcept;
44 int Outline() const noexcept;
45 void Outline(int) noexcept;
47 int Hinting() const noexcept;
48 void Hinting(int) const noexcept;
49 bool Kerning() const noexcept;
50 void Kerning(bool) noexcept;
52 int Height() const noexcept;
53 int Ascent() const noexcept;
54 int Descent() const noexcept;
55 int LineSkip() const noexcept;
57 const char *FamilyName() const noexcept;
58 const char *StyleName() const noexcept;
60 bool HasGlyph(Uint16) const noexcept;
62 glm::ivec2 TextSize(const char *) const;
64 Texture Render(const char *) const;
65 void Render(const char *, Texture &) const;