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.
280 [[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.
bool hasGlyph(std::uint32_t codePoint) const
Determine if this font has a glyph representing the requested code point.
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.
float getKerning(std::uint32_t first, std::uint32_t second, unsigned int characterSize, bool bold=false) const
Get the kerning offset of two glyphs.
const Glyph & getGlyph(std::uint32_t codePoint, unsigned int characterSize, bool bold, float outlineThickness=0) const
Retrieve a glyph of the font.
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.
Definition AudioResource.hpp:36