7#include "text_shaper_char.hpp"
8#include "font_metrics.hpp"
9#include "../unicode/unicode_bidi_class.hpp"
14namespace hi::inline
v1 {
18 using iterator = std::vector<text_shaper_char>::iterator;
19 using const_iterator = std::vector<text_shaper_char>::const_iterator;
92 hi::font_metrics
const &metrics)
noexcept;
94 [[nodiscard]]
constexpr size_t size() const noexcept
96 return columns.
size();
99 [[nodiscard]]
constexpr iterator front() const noexcept
101 return columns.
front();
104 [[nodiscard]]
constexpr iterator back() const noexcept
106 return columns.
back();
109 iterator operator[](
size_t index)
const noexcept
111 hi_assert_bounds(index, columns);
112 return columns[index];
115 void layout(horizontal_alignment alignment,
float min_x,
float max_x,
float sub_pixel_width)
noexcept;
types and utilities for alignment.
DOXYGEN BUG.
Definition algorithm.hpp:15
unicode_bidi_class
Bidirectional class Unicode Standard Annex #9: https://unicode.org/reports/tr9/.
Definition unicode_bidi_class.hpp:17
The metrics of a font.
Definition font_metrics.hpp:15
Definition text_shaper_line.hpp:16
size_t line_nr
The line number of this line, counted from top to bottom.
Definition text_shaper_line.hpp:42
unicode_general_category last_category
Category of the last character on the line.
Definition text_shaper_line.hpp:69
std::pair< const_iterator, bool > get_nearest(point2 position) const noexcept
Get the character nearest to position.
text_shaper_line(size_t line_nr, const_iterator begin, iterator first, iterator last, float width, hi::font_metrics const &metrics) noexcept
Construct a line.
float width
The width of this line, excluding trailing white space, glyph morphing and kerning.
Definition text_shaper_line.hpp:60
font_metrics metrics
The maximum metrics of the font of each glyph on this line.
Definition text_shaper_line.hpp:38
float y
Position of the base-line of this line.
Definition text_shaper_line.hpp:46
iterator first
The first character in the line, in logical order.
Definition text_shaper_line.hpp:24
unicode_bidi_class paragraph_direction
The writing direction of the paragraph.
Definition text_shaper_line.hpp:75
column_vector columns
Iterators to the characters in the text.
Definition text_shaper_line.hpp:34
iterator last
One beyond the last character in the line, in logical order.
Definition text_shaper_line.hpp:28
aarectangle rectangle
The rectangle of the line.
Definition text_shaper_line.hpp:56