|
|
| true_type_font (std::filesystem::path const &path) |
|
| true_type_font (true_type_font const &other)=delete |
|
true_type_font & | operator= (true_type_font const &other)=delete |
|
| true_type_font (true_type_font &&other)=delete |
|
true_type_font & | operator= (true_type_font &&other)=delete |
| bool | loaded () const noexcept override |
| | Return if the font is loaded.
|
| graphic_path | get_path (hi::glyph_id glyph_id) const override |
| | Load a glyph into a path.
|
| float | get_advance (hi::glyph_id glyph_id) const override |
| | Get the advance for a glyph.
|
| glyph_metrics | get_metrics (hi::glyph_id glyph_id) const override |
| | Load a glyph into a path.
|
| shape_run_result_type | shape_run (iso_639 language, iso_15924 script, gstring run) const override |
| | Shape a run of graphemes.
|
|
| font (font const &)=delete |
|
font & | operator= (font const &)=delete |
|
| font (font &&)=delete |
|
font & | operator= (font &&)=delete |
| glyph_id | find_glyph (char32_t c) const noexcept |
| | Get the glyph for a code-point.
|
| lean_vector< glyph_id > | find_glyph (grapheme g) const |
| | Get the glyphs for a grapheme.
|
|
glyph_atlas_info & | atlas_info (glyph_id glyph) const |
|
font_variant | font_variant () const noexcept |
◆ get_advance()
| float v1::true_type_font::get_advance |
( |
hi::glyph_id | glyph_id | ) |
const |
|
inlinenodiscardoverridevirtual |
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()
|
|
inlinenodiscardoverridevirtual |
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 |
|
inlinenodiscardoverridevirtual |
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 |
|
inlinenodiscardoverridevirtualnoexcept |
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()
|
|
inlinenodiscardoverridevirtual |
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: