|
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 | 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) override |
| Returns 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...
|
|
virtual bool | loadFromMemory (const void *data, std::size_t sizeInBytes) |
| Loads a font from memory. More...
|
|
virtual bool | loadFromMemory (std::unique_ptr< std::uint8_t[]> data, std::size_t sizeInBytes)=0 |
| Loads a font from memory. More...
|
|
virtual float | getKerning (char32_t first, char32_t second, unsigned int characterSize) |
| Returns the kerning offset of two glyphs. 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 | ~BackendFont ()=default |
| Virtual destructor.
|
|
virtual bool | loadFromFile (const String &filename) |
| Loads a font from a file. More...
|
|
bool | isSmooth () const |
| Tell whether the smooth filter is enabled or not. More...
|
|
Font implementation that makes use of SFML.
virtual float tgui::BackendFont::getKerning |
( |
char32_t |
first, |
|
|
char32_t |
second, |
|
|
unsigned int |
characterSize |
|
) |
| |
|
inlinevirtual |
Returns the kerning offset of two glyphs.
The kerning is an extra offset (negative) to apply between two glyphs when rendering them, to make the pair look more "natural". For example, the pair "AV" have a special kerning to make them closer than other characters. Most of the glyphs pairs have a kerning offset of zero, though.
- Parameters
-
first | Unicode code point of the first character |
second | Unicode code point of the second character |
characterSize | Size of the characters |
- Returns
- Kerning value for first and second, in pixels
Reimplemented from tgui::BackendFont.
float tgui::BackendFontSFML::getKerning |
( |
char32_t |
first, |
|
|
char32_t |
second, |
|
|
unsigned int |
characterSize, |
|
|
bool |
bold |
|
) |
| |
|
overridevirtual |
Returns the kerning offset of two glyphs.
The kerning is an extra offset (negative) to apply between two glyphs when rendering them, to make the pair look more "natural". For example, the pair "AV" have a special kerning to make them closer than other characters. Most of the glyphs pairs have a kerning offset of zero, though.
- Parameters
-
first | Unicode code point of the first character |
second | Unicode code point of the second character |
characterSize | Size of the characters |
bold | Are the glyphs bold or regular? |
- Returns
- Kerning value for first and second, in pixels
Implements tgui::BackendFont.
virtual float tgui::BackendFont::getKerning |
( |
char32_t |
first, |
|
|
char32_t |
second, |
|
|
unsigned int |
characterSize, |
|
|
bool |
bold |
|
) |
| |
|
virtual |
Returns the kerning offset of two glyphs.
The kerning is an extra offset (negative) to apply between two glyphs when rendering them, to make the pair look more "natural". For example, the pair "AV" have a special kerning to make them closer than other characters. Most of the glyphs pairs have a kerning offset of zero, though.
- Parameters
-
first | Unicode code point of the first character |
second | Unicode code point of the second character |
characterSize | Size of the characters |
bold | Are the glyphs bold or regular? |
- Returns
- Kerning value for first and second, in pixels
Implements tgui::BackendFont.