29#include <TGUI/String.hpp>
30#include <TGUI/Rect.hpp>
78 Font(std::nullptr_t =
nullptr) noexcept;
104 Font(const
void* data, std::
size_t sizeInBytes);
129 operator
bool() const;
136 bool operator==(std::nullptr_t) const;
143 bool operator!=(std::nullptr_t) const;
149 bool operator==(const
Font& right) const;
155 bool operator!=(const
Font& right) const;
171 FontGlyph getGlyph(
char32_t codePoint,
unsigned int characterSize,
bool bold,
float outlineThickness = 0) const;
188 float getKerning(
char32_t first,
char32_t second,
unsigned int characterSize,
bool bold = false) const;
200 float getLineSpacing(
unsigned int characterSize) const;
210 float getFontHeight(
unsigned int characterSize) const;
222 void setSmooth(
bool smooth);
232 bool isSmooth() const;
Base class for font implementations that depend on the backend.
Definition: BackendFont.hpp:43
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 Font getGlobalFont()
Returns the global font that is used for all new widgets.
Wrapper class to store strings.
Definition: String.hpp:79
Namespace that contains all TGUI functions and classes.
Definition: AbsoluteOrRelativeValue.hpp:36
Information about a glyph in the font.
Definition: Font.hpp:47
FloatRect bounds
Bounding rectangle of the glyph, in coordinates relative to the baseline.
Definition: Font.hpp:49
UIntRect textureRect
Texture coordinates of the glyph inside the font's texture.
Definition: Font.hpp:50