28#include <TGUI/String.hpp>
29#include <TGUI/Rect.hpp>
31#if !TGUI_EXPERIMENTAL_USE_STD_MODULE
40TGUI_MODULE_EXPORT
namespace tgui
76 Font(std::nullptr_t =
nullptr) noexcept;
97 Font(const
void* data, std::
size_t sizeInBytes);
112 TGUI_NODISCARD const
String& getId() const;
117 operator
bool() const;
122 TGUI_NODISCARD
bool operator==(std::nullptr_t) const;
127 TGUI_NODISCARD
bool operator!=(std::nullptr_t) const;
132 TGUI_NODISCARD
bool operator==(const
Font& right) const;
137 TGUI_NODISCARD
bool operator!=(const
Font& right) const;
152 TGUI_NODISCARD
FontGlyph getGlyph(
char32_t codePoint,
unsigned int characterSize,
bool bold,
float outlineThickness = 0) const;
168 TGUI_NODISCARD
float getKerning(
char32_t first,
char32_t second,
unsigned int characterSize,
bool bold = false) const;
179 TGUI_NODISCARD
float getLineSpacing(
unsigned int characterSize) const;
188 TGUI_NODISCARD
float getFontHeight(
unsigned int characterSize) const;
199 void setSmooth(
bool smooth);
208 TGUI_NODISCARD
bool isSmooth() const;
214 TGUI_NODISCARD std::shared_ptr<
BackendFont> getBackendFont() const;
Base class for font implementations that depend on the backend.
Definition BackendFont.hpp:45
Wrapper around the backend-specific font. All copies of the font will share the same internal font re...
Definition Font.hpp:58
Font(std::nullptr_t=nullptr) noexcept
Default constructor which will set the font to nullptr.
static void setGlobalFont(const Font &font)
Changes the global font that is used for all new widgets.
static TGUI_NODISCARD Font getGlobalFont()
Returns the global font that is used for all new widgets.
Wrapper class to store strings.
Definition String.hpp:96
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:38
Information about a glyph in the font.
Definition Font.hpp:48
FloatRect bounds
Bounding rectangle of the glyph, in coordinates relative to the baseline.
Definition Font.hpp:50
UIntRect textureRect
Texture coordinates of the glyph inside the font's texture.
Definition Font.hpp:51