Loading...
Searching...
No Matches
Font.hpp
Go to the documentation of this file.
7// In no event will the authors be held liable for any damages arising from the use of this software.
240 [[nodiscard]] const Glyph& getGlyph(char32_t codePoint, unsigned int characterSize, bool bold, float outlineThickness = 0) const;
277 [[nodiscard]] float getKerning(std::uint32_t first, std::uint32_t second, unsigned int characterSize, bool bold = false) const;
bool openFromMemory(const void *data, std::size_t sizeInBytes)
Open the font from a file in memory.
const Texture & getTexture(unsigned int characterSize) const
Retrieve the texture containing the loaded glyphs of a certain size.
float getUnderlinePosition(unsigned int characterSize) const
Get the position of the underline.
Font(const void *data, std::size_t sizeInBytes)
Construct the font from a file in memory.
const Glyph & getGlyph(char32_t codePoint, unsigned int characterSize, bool bold, float outlineThickness=0) const
Retrieve a glyph of the font.
float getKerning(std::uint32_t first, std::uint32_t second, unsigned int characterSize, bool bold=false) const
Get the kerning offset of two glyphs.
float getUnderlineThickness(unsigned int characterSize) const
Get the thickness of the underline.
bool openFromFile(const std::filesystem::path &filename)
Open the font from a file.
bool hasGlyph(char32_t codePoint) const
Determine if this font has a glyph representing the requested code point.
Definition AudioResource.hpp:36