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
◆ ~FontRuntime()
kanzi::FontRuntime::~FontRuntime |
( |
| ) |
|
◆ getFontFile()
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.
◆ getFontStyleDefinition()
Returns the font style definition of the runtime font.
- Returns
- Reference to the font style definition that the runtime font holds.
◆ getLineHeight()
float kanzi::FontRuntime::getLineHeight |
( |
| ) |
const |
Returns the line height of a runtime font.
- Returns
- Line height of the font.
◆ getAscender()
float kanzi::FontRuntime::getAscender |
( |
| ) |
const |
Returns the ascender of a font.
- Returns
- Ascender of the font.
◆ getDescender()
float kanzi::FontRuntime::getDescender |
( |
| ) |
const |
Returns the descender of a font.
- Returns
- Descender of the font.
◆ getGlyphIndex()
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.
◆ getAdvance()
float kanzi::FontRuntime::getAdvance |
( |
unsigned int |
glyphIndex | ) |
const |
Returns the advance metric of the given glyph.
- Parameters
-
- Returns
- Advance for the given glyph.
◆ getBoundingBox()
RectangleFloat kanzi::FontRuntime::getBoundingBox |
( |
unsigned int |
glyphIndex | ) |
const |
Returns the bounding box of the given glyph.
- Parameters
-
- Returns
- Bounding box of the given glyph.
◆ getKerning()
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.
◆ getGlyphData()
Returns the bitmap data for the given glyph.
- Parameters
-
- Returns
- Bitmap data for the given glyph.
◆ setupFontFile()
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.
◆ getFontFamily()
Gets the font family the runtime font object uses.
- Returns
- The font family the runtime font object uses.
◆ getGlyphCache()
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.
◆ FontManager
The documentation for this class was generated from the following file: