7#include "text_shaper_char.hpp"
8#include "../font/module.hpp"
9#include "../unicode/module.hpp"
10#include "../geometry/module.hpp"
13namespace hi::inline
v1 {
17 using iterator = std::vector<text_shaper_char>::iterator;
18 using const_iterator = std::vector<text_shaper_char>::const_iterator;
91 hi::font_metrics
const &metrics)
noexcept;
93 [[nodiscard]]
constexpr size_t size() const noexcept
95 return columns.
size();
98 [[nodiscard]]
constexpr iterator front() const noexcept
100 return columns.
front();
103 [[nodiscard]]
constexpr iterator back() const noexcept
105 return columns.
back();
108 iterator operator[](
size_t index)
const noexcept
111 return columns[index];
114 void layout(horizontal_alignment alignment,
float min_x,
float max_x,
float sub_pixel_width)
noexcept;
#define hi_assert_bounds(x,...)
Assert if a value is within bounds.
Definition assert.hpp:225
DOXYGEN BUG.
Definition algorithm.hpp:13
The metrics of a font.
Definition font_metrics.hpp:15
Definition text_shaper_line.hpp:15
size_t line_nr
The line number of this line, counted from top to bottom.
Definition text_shaper_line.hpp:41
unicode_general_category last_category
Category of the last character on the line.
Definition text_shaper_line.hpp:68
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:59
font_metrics metrics
The maximum metrics of the font of each glyph on this line.
Definition text_shaper_line.hpp:37
float y
Position of the base-line of this line.
Definition text_shaper_line.hpp:45
iterator first
The first character in the line, in logical order.
Definition text_shaper_line.hpp:23
unicode_bidi_class paragraph_direction
The writing direction of the paragraph.
Definition text_shaper_line.hpp:74
column_vector columns
Iterators to the characters in the text.
Definition text_shaper_line.hpp:33
iterator last
One beyond the last character in the line, in logical order.
Definition text_shaper_line.hpp:27
aarectangle rectangle
The rectangle of the line.
Definition text_shaper_line.hpp:55