◆ TrueTypeFont()
| tt::TrueTypeFont::TrueTypeFont |
( |
nonstd::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()
| GlyphID tt::TrueTypeFont::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()
| std::optional< GlyphID > tt::TrueTypeFont::loadGlyph |
( |
GlyphID | glyph_id, |
|
|
Path & | path ) const |
|
overridevirtualnoexcept |
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.
◆ loadGlyphMetrics()
Load a glyphMetrics into a path. The glyph is directly loaded from the font file.
- Parameters
-
| glyphIndex | 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: