◆ true_type_font()
| tt::true_type_font::true_type_font |
( |
std::span< std::byte const > | bytes | ) |
|
|
inline |
Load a true type font.
The methods in this class will parse the true-type font at run time. This also means that the bytes passed into this constructor will need to remain available.
◆ find_glyph()
| tt::glyph_id tt::true_type_font::find_glyph |
( |
char32_t | c | ) |
const |
|
overridevirtualnoexcept |
Get the glyph for a code-point.
- Returns
- glyph-index, or invalid when not found or error.
Implements tt::font.
◆ loadGlyph()
Load a glyph into a path.
The glyph is directly loaded from the font file.
- Parameters
-
| glyph_id | the index of a glyph inside the font. |
| path | The path constructed by the loader. |
- Returns
- empty on failure, or the glyphID of the metrics to use.
Implements tt::font.
◆ loadglyph_metrics()
Load a glyphMetrics into a path.
The glyph is directly loaded from the font file.
- Parameters
-
| glyph_id | the index of a glyph inside the font. |
| metrics | The metrics constructed by the loader. |
| lookahead_glyph_id | The next glyph, used for determining kerning. |
- Returns
- 1 on success, 0 on not implemented
Implements tt::font.
The documentation for this class was generated from the following file: