◆ get_advance()
float v1::true_type_font::get_advance |
( |
hi::glyph_id | glyph_id | ) |
const |
|
inlineoverridevirtual |
Get the advance for a glyph.
- Parameters
-
glyph_id | The glyph to look up the advance for. |
- Returns
- The advance for the glyph.
- Exceptions
-
Implements v1::font.
◆ get_metrics()
glyph_metrics v1::true_type_font::get_metrics |
( |
hi::glyph_id | glyph_id | ) |
const |
|
inlineoverridevirtual |
Load a glyph into a path.
The glyph is directly loaded from the font file.
- Parameters
-
glyph_id | the id of a glyph inside the font. |
metrics | The metrics constructed by the loader. |
lookahead_glyph_id | The id of a glyph to the right, needed for kerning. |
- Returns
- true on success, false on error.
Implements v1::font.
◆ get_path()
graphic_path v1::true_type_font::get_path |
( |
hi::glyph_id | glyph_id | ) |
const |
|
inlineoverridevirtual |
Load a glyph into a path.
The glyph is directly loaded from the font file.
- Parameters
-
glyph_id | the id of a glyph inside the font. |
- Returns
- The path loaded from the font file.
- Exceptions
-
std::exception | If there was an error while loading the path. Recommend to disable the font on error. |
Implements v1::font.
◆ loaded()
bool v1::true_type_font::loaded |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
Return if the font is loaded.
- Returns
- true if the font is fully loaded, false if only metadata of the font is available.
Implements v1::font.
◆ shape_run()
Shape a run of graphemes.
A run of graphemes is a piece of text that is:
- from the same style,
- from the same font,
- from the same language and script, and
- on the same line.
A run needs to be shaped by the font-file itself as it handles:
- language/script depended glyph substitution for ligatures, accents and cursive text.
- language/script depended glyph positioning for kerning, accents and cursive text.
- Parameters
-
language | The language of this run of graphemes. |
script | The script of this run of graphemes. |
run | The run of graphemes. |
- Returns
- The glyphs and coordinates to display, and coordinates of grapheme for interaction.
Implements v1::font.
The documentation for this class was generated from the following file: