|
| ~BackendFontSDLttf () override |
| Destructor that cleans up the SDL resources.
|
|
bool | loadFromMemory (std::unique_ptr< std::uint8_t[]> data, std::size_t sizeInBytes) override |
| Loads a font from memory. More...
|
|
bool | hasGlyph (char32_t codePoint) const override |
| Returns whether a font contains a certain glyph. More...
|
|
FontGlyph | getGlyph (char32_t codePoint, unsigned int characterSize, bool bold, float outlineThickness=0) override |
| Retrieve a glyph of the font. More...
|
|
float | getKerning (char32_t first, char32_t second, unsigned int characterSize, bool bold) override |
| Returns the kerning offset of two glyphs. More...
|
|
float | getLineSpacing (unsigned int characterSize) override |
| Returns the line spacing. More...
|
|
float | getFontHeight (unsigned int characterSize) override |
| Returns the height required to render a line of text. More...
|
|
float | getAscent (unsigned int characterSize) override |
| Returns the maximum height of a glyph above the baseline. More...
|
|
float | getDescent (unsigned int characterSize) override |
| Returns the maximum height of a glyph below the baseline. More...
|
|
float | getUnderlinePosition (unsigned int characterSize) override |
| Get the position of the underline. More...
|
|
float | getUnderlineThickness (unsigned int characterSize) override |
| Get the thickness of the underline. More...
|
|
std::shared_ptr< BackendTexture > | getTexture (unsigned int characterSize, unsigned int &textureVersion) override |
| Returns the texture that is used to store glyphs of the given character size. More...
|
|
Vector2u | getTextureSize (unsigned int characterSize) override |
| Returns the size of the texture that is used to store glyphs of the given character size. More...
|
|
void | setSmooth (bool smooth) override |
| Enable or disable the smooth filter. More...
|
|
void | setFontScale (float scale) override |
|
TTF_Font * | getInternalFont (unsigned int characterSize) |
|
virtual bool | loadFromMemory (std::unique_ptr< std::uint8_t[]> data, std::size_t sizeInBytes)=0 |
| Loads a font from memory. More...
|
|
bool | loadFromMemory (const void *data, std::size_t sizeInBytes) |
| Loads a font from memory. More...
|
|
| BackendFont () |
| Default constructor.
|
|
| BackendFont (const BackendFont &) |
| Copy constructor.
|
|
| BackendFont (BackendFont &&other) noexcept |
| Move constructor.
|
|
virtual | ~BackendFont () |
| Virtual destructor.
|
|
BackendFont & | operator= (const BackendFont &other) |
| Copy assignment operator.
|
|
BackendFont & | operator= (BackendFont &&other) noexcept |
| Move assignment operator.
|
|
virtual bool | loadFromFile (const String &filename) |
| Loads a font from a file. More...
|
|
virtual bool | loadFromMemory (std::unique_ptr< std::uint8_t[]> data, std::size_t sizeInBytes)=0 |
| Loads a font from memory. More...
|
|
bool | loadFromMemory (const void *data, std::size_t sizeInBytes) |
| Loads a font from memory. More...
|
|
virtual bool | hasGlyph (char32_t codePoint) const =0 |
| Returns whether a font contains a certain glyph. More...
|
|
virtual FontGlyph | getGlyph (char32_t codePoint, unsigned int characterSize, bool bold, float outlineThickness=0)=0 |
| Retrieve a glyph of the font. More...
|
|
virtual float | getKerning (char32_t first, char32_t second, unsigned int characterSize, bool bold)=0 |
| Returns the kerning offset of two glyphs. More...
|
|
virtual float | getLineSpacing (unsigned int characterSize)=0 |
| Returns the line spacing. More...
|
|
virtual float | getFontHeight (unsigned int characterSize)=0 |
| Returns the height required to render a line of text. More...
|
|
virtual float | getAscent (unsigned int characterSize)=0 |
| Returns the maximum height of a glyph above the baseline. More...
|
|
virtual float | getDescent (unsigned int characterSize)=0 |
| Returns the maximum height of a glyph below the baseline. More...
|
|
virtual float | getUnderlinePosition (unsigned int characterSize)=0 |
| Get the position of the underline. More...
|
|
virtual float | getUnderlineThickness (unsigned int characterSize)=0 |
| Get the thickness of the underline. More...
|
|
virtual std::shared_ptr< BackendTexture > | getTexture (unsigned int characterSize, unsigned int &textureVersion)=0 |
| Returns the texture that is used to store glyphs of the given character size. More...
|
|
virtual Vector2u | getTextureSize (unsigned int characterSize)=0 |
| Returns the size of the texture that is used to store glyphs of the given character size. More...
|
|
virtual void | setSmooth (bool smooth) |
| Enable or disable the smooth filter. More...
|
|
bool | isSmooth () const |
| Tell whether the smooth filter is enabled or not. More...
|
|
virtual void | setFontScale (float scale) |
|
float | getFontScale () const |
| Returns the scale at which glyphs are rendered. More...
|
|
Font implementations that uses SDL_ttf to load glyphs.