|
HikoGUI
A low latency retained GUI
|
#include <hikogui/text/font.hpp>
Data Structures | |
| struct | substitution_and_kerning_type |
Data Fields | |
| std::string | family_name |
| The family name as parsed from the font file. | |
| std::string | sub_family_name |
| The sub-family name as parsed from the font file. | |
| bool | monospace = false |
| bool | serif = false |
| bool | italic = false |
| bool | condensed = false |
| font_weight | weight = font_weight::Regular |
| float | optical_size = 12.0 |
| std::string | features |
| A string representing the features of a font. | |
| hi::unicode_mask | unicode_mask |
| hi::font_metrics | metrics |
| The metrics of a font. | |
| std::vector< hi::font * > | fallback_chain |
| List of fonts to use as a fallback for this font. | |
Friends | |
| std::string | to_string (font const &rhs) noexcept |
A font. This class has information on how to shape text and get glyphs consisting of bezier contours.
Get the glyph for a code-point.
Implemented in v1::true_type_font.
|
noexcept |
Get the glyphs for a grapheme.
|
pure virtualnoexcept |
Get the kerning between two glyphs.
| current_glyph | The glyph on the left |
| next_glyph | The glyph on the right |
Implemented in v1::true_type_font.
|
pure virtualnoexcept |
Load a glyph into a path. The glyph is directly loaded from the font file.
| glyph_id | the id of a glyph inside the font. |
| path | The path constructed by the loader. |
Implemented in v1::true_type_font.
|
pure virtualnoexcept |
Load a glyph into a path. The glyph is directly loaded from the font file.
| 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. |
Implemented in v1::true_type_font.
Return if the font is loaded.
Implemented in v1::true_type_font.
|
pure virtualnoexcept |
Substitute and kern a run of glyphs.
| language | The language that the word is written in. | |
| script | The script that the word is written in. | |
| [in,out] | word | A run of glyphs, from the same font, font-size and script of a word. |
Implemented in v1::true_type_font.
| std::vector<hi::font *> v1::font::fallback_chain |
List of fonts to use as a fallback for this font.
| std::string v1::font::family_name |
The family name as parsed from the font file.
Examples: "Helvetica", "Times New Roman"
| std::string v1::font::features |
A string representing the features of a font.
This will be a comma separated list of features, mostly tables like 'kern' and 'GPOS'.
| hi::font_metrics v1::font::metrics |
The metrics of a font.
| std::string v1::font::sub_family_name |
The sub-family name as parsed from the font file.
Examples: "Regular", "ItalicBold"