29#include <TGUI/Config.hpp>
30#include <SFML/Graphics/Font.hpp>
50 Font(std::nullptr_t =
nullptr);
59 Font(
const std::string&
id);
77 Font(
const std::shared_ptr<sf::Font>& font);
86 Font(
const sf::Font& font);
94 Font(
const void* data, std::size_t sizeInBytes);
147 operator std::shared_ptr<sf::Font>()
const;
154 operator bool()
const;
199 const sf::Glyph&
getGlyph(std::uint32_t codePoint,
unsigned int characterSize,
bool bold,
float outlineThickness = 0)
const;
216 float getKerning(std::uint32_t first, std::uint32_t second,
unsigned int characterSize)
const;
235 std::shared_ptr<sf::Font> m_font;
const std::string & getId() const
Returns the id that was used to load the font.
bool operator==(std::nullptr_t) const
Compares the font with a nullptr.
float getLineSpacing(unsigned int characterSize) const
Returns the line spacing.
bool operator==(const Font &right) const
Compares the font with another one.
Font(const sf::Font &font)
Constructor to set a copy of your font.
float getKerning(std::uint32_t first, std::uint32_t second, unsigned int characterSize) const
Returns the kerning offset of two glyphs.
const sf::Glyph & getGlyph(std::uint32_t codePoint, unsigned int characterSize, bool bold, float outlineThickness=0) const
Retrieve a glyph of the font.
bool operator!=(std::nullptr_t) const
Compares the font with a nullptr.
std::shared_ptr< sf::Font > getFont() const
Gets the underlying SFML font.
Font(const std::string &id)
Constructor to create the font from a string (filename by default)
Font(const std::shared_ptr< sf::Font > &font)
Constructor to share the font directly.
Font(std::nullptr_t=nullptr)
Default constructor which will set the font to nullptr.
Font(const void *data, std::size_t sizeInBytes)
Constructor to create the font from a byte array.
Font(const char *id)
Constructor to create the font from a string (filename by default)
bool operator!=(const Font &right) const
Compares the font with another one.
Namespace that contains all TGUI functions and classes.
Definition: AbsoluteOrRelativeValue.hpp:37