29#include <TGUI/String.hpp>
30#include <TGUI/Rect.hpp>
32#if !TGUI_EXPERIMENTAL_USE_STD_MODULE
41TGUI_MODULE_EXPORT
namespace tgui
82 Font(std::nullptr_t =
nullptr) noexcept;
108 Font(const
void* data, std::
size_t sizeInBytes);
126 TGUI_NODISCARD const
String& getId() const;
133 operator
bool() const;
140 TGUI_NODISCARD
bool operator==(std::nullptr_t) const;
147 TGUI_NODISCARD
bool operator!=(std::nullptr_t) const;
153 TGUI_NODISCARD
bool operator==(const
Font& right) const;
159 TGUI_NODISCARD
bool operator!=(const
Font& right) const;
175 TGUI_NODISCARD
FontGlyph getGlyph(
char32_t codePoint,
unsigned int characterSize,
bool bold,
float outlineThickness = 0) const;
192 TGUI_NODISCARD
float getKerning(
char32_t first,
char32_t second,
unsigned int characterSize,
bool bold = false) const;
204 TGUI_NODISCARD
float getLineSpacing(
unsigned int characterSize) const;
214 TGUI_NODISCARD
float getFontHeight(
unsigned int characterSize) const;
226 void setSmooth(
bool smooth);
236 TGUI_NODISCARD
bool isSmooth() const;
243 TGUI_NODISCARD std::shared_ptr<
BackendFont> getBackendFont() const;
Base class for font implementations that depend on the backend.
Definition BackendFont.hpp:46
Wrapper around the backend-specific font. All copies of the font will share the same internal font re...
Definition Font.hpp:61
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:101
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:39
Information about a glyph in the font.
Definition Font.hpp:50
FloatRect bounds
Bounding rectangle of the glyph, in coordinates relative to the baseline.
Definition Font.hpp:52
UIntRect textureRect
Texture coordinates of the glyph inside the font's texture.
Definition Font.hpp:53