|
HikoGUI
A low latency retained GUI
|
Public Member Functions | |
| constexpr | line_metric (size_t index) noexcept |
| void | add_char (unicode_general_category category, float estimated_width, hi::font_metrics font_metrics) noexcept |
| template<bool LastWord> | |
| void | _add_word (line_metrics const &rhs) noexcept |
| void | add_word (line_metrics const &rhs) noexcept |
| void | add_last_word (line_metrics const &rhs) noexcept |
Data Fields | |
| hi::font_metrics | font_metrics |
| The combined metrics for all the glyphs on the line. | |
| std::size_t | index = 0 |
| The index of the first character in the text belonging to this line. | |
| std::size_t | size = 0 |
| The number of characters on this line. | |
| float | estimated_width = 0.0f |
| The estimated width of the line. | |
| float | width = 0.0 |
| The width of the line. | |
| float | y = 0.0f |
| The line position. | |
| float | x = 0.0f |
| The horizontal line position. | |
| unicode_general_category | category = unicode_general_category::Cn |
| The category of the last (logical ordering) character on the line. | |
| bool | is_visible |
| The line has visible characters. | |
| unicode_general_category v1::line_metrics::category = unicode_general_category::Cn |
The category of the last (logical ordering) character on the line.
When:
| float v1::line_metrics::estimated_width = 0.0f |
The estimated width of the line.
Based on the advance of each glyph, except for white-space at the end of a line. The estimated width does not take into account kerning or glyph-morphing.
| hi::font_metrics v1::line_metrics::font_metrics |
The combined metrics for all the glyphs on the line.
| std::size_t v1::line_metrics::index = 0 |
The index of the first character in the text belonging to this line.
| bool v1::line_metrics::is_visible |
The line has visible characters.
| std::size_t v1::line_metrics::size = 0 |
The number of characters on this line.
| float v1::line_metrics::width = 0.0 |
The width of the line.
The width includes bidi-algorithm, kerning, glyph-morphing and bounding rectangles of the glyphs. The width excludes the white space at the end of the line.
| float v1::line_metrics::x = 0.0f |
The horizontal line position.
This value is calculated after determining width and then horizontally aligning the text.
| float v1::line_metrics::y = 0.0f |
The line position.
The top line is at y = 0. Following lines will have negative y values.