Runtime font.
More...
#include <kanzi/core.ui/font/font_runtime.hpp>
Runtime font.
Use FontRuntime to draw text using TextFormat. To acquire the runtime font, use FontManager::getRuntimeFont.
- Since
- Kanzi 3.8.0
kanzi::FontRuntime::~FontRuntime |
( |
| ) |
|
FontFile& kanzi::FontRuntime::getFontFile |
( |
| ) |
const |
Returns the font file that this runtime font is using.
- Returns
- The font file that this runtime font is using.
Returns the font style definition of the runtime font.
- Returns
- Reference to the font style definition that the runtime font holds.
float kanzi::FontRuntime::getLineHeight |
( |
| ) |
const |
Returns the line height of a runtime font.
- Returns
- Line height of the font.
float kanzi::FontRuntime::getAscender |
( |
| ) |
const |
Returns the ascender of a font.
- Returns
- Ascender of the font.
float kanzi::FontRuntime::getDescender |
( |
| ) |
const |
Returns the descender of a font.
- Returns
- Descender of the font.
unsigned int kanzi::FontRuntime::getGlyphIndex |
( |
char32_t |
character | ) |
const |
Returns the glyph index in a font for the given unicode code point.
- Parameters
-
character | The unicode code point to use. |
- Returns
- Glyph index for the given code point.
float kanzi::FontRuntime::getAdvance |
( |
unsigned int |
glyphIndex | ) |
const |
Returns the advance metric of the given glyph.
- Parameters
-
- Returns
- Advance for the given glyph.
RectangleFloat kanzi::FontRuntime::getBoundingBox |
( |
unsigned int |
glyphIndex | ) |
const |
Returns the bounding box of the given glyph.
- Parameters
-
- Returns
- Bounding box of the given glyph.
float kanzi::FontRuntime::getKerning |
( |
unsigned int |
previousGlyphIndex, |
|
|
unsigned int |
glyphIndex |
|
) |
| const |
Returns the kerning between the given pair of glyphs.
- Parameters
-
previousGlyphIndex | Index of the font glyph data of the preceding glyph. |
glyphIndex | Index of the font glyph data acquired from getGlyphIndex(). |
- Returns
- Kerning between the given glyph pair.
Returns the bitmap data for the given glyph.
- Parameters
-
- Returns
- Bitmap data for the given glyph.
void kanzi::FontRuntime::setupFontFile |
( |
| ) |
const |
Sets the size of the underlying font file object.
Several font and font family objects can share the same font file object. Call this function before all other operations.
Gets the font family the runtime font object uses.
- Returns
- The font family the runtime font object uses.
GlyphCache& kanzi::FontRuntime::getGlyphCache |
( |
| ) |
const |
Gets the glyph cache that the runtime font object uses.
- Returns
- The glyph cache that the runtime font object uses.
The documentation for this class was generated from the following file: