|
HikoGUI
A low latency retained GUI
|
#include <ttauri/text/font.hpp>
Public Member Functions | |
| font (font const &)=delete | |
| font & | operator= (font const &)=delete |
| font (font &&)=delete | |
| font & | operator= (font &&)=delete |
| virtual bool | loaded () const noexcept=0 |
| Return if the font is loaded. | |
| virtual tt::glyph_id | find_glyph (char32_t c) const noexcept=0 |
| Get the glyph for a code-point. | |
| font_glyph_ids | find_glyph (grapheme g) const noexcept |
| Get the glyphs for a grapheme. | |
| virtual std::optional< tt::glyph_id > | load_glyph (tt::glyph_id glyph_id, graphic_path &path) const noexcept=0 |
| virtual bool | load_glyph_metrics (tt::glyph_id glyph_id, glyph_metrics &metrics, tt::glyph_id lookahead_glyph_id=tt::glyph_id{}) const noexcept=0 |
| font_variant | font_variant () const noexcept |
Data Fields | |
| std::string | family_name |
| The description is filled with information parsed from the font. | |
| std::string | sub_family_name |
| bool | monospace = false |
| bool | serif = false |
| bool | italic = false |
| bool | condensed = false |
| font_weight | weight = font_weight::Regular |
| float | optical_size = 12.0 |
| tt::unicode_mask | unicode_mask |
| float | xHeight = 0.0 |
| float | HHeight = 0.0 |
| float | DigitWidth = 0.0 |
| std::vector< tt::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.
|
pure virtualnoexcept |
Get the glyph for a code-point.
Implemented in tt::true_type_font.
|
noexcept |
Get the glyphs for a grapheme.
|
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 tt::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 tt::true_type_font.
|
pure virtualnoexcept |
Return if the font is loaded.
Implemented in tt::true_type_font.
| std::vector<tt::font *> tt::font::fallback_chain |
List of fonts to use as a fallback for this font.
| std::string tt::font::family_name |
The description is filled with information parsed from the font.