HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
text_shaper_char.hpp
1// Copyright Take Vos 2022.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
5#pragma once
6
7#include "text_theme.hpp"
8#include "character.hpp"
9#include "../font/module.hpp"
10#include "../unicode/module.hpp"
11#include "../geometry/module.hpp"
12
13namespace hi::inline v1 {
14
16public:
19 hi::character character = {};
20
23 hi::character bidi_character = {};
24
27 hi::text_style style = {};
28
31 hi::font const *font = nullptr;
32
35 float width = 0.0f;
36
39 point2 position = {};
40
43 float advance = 0.0f;
44
64 aarectangle rectangle = {};
65
70 lean_vector<hi::glyph_id> glyphs = {};
71
74 lean_vector<hi::aarectangle> glyph_rectangles = {};
75
79
83
88 unicode_bidi_class direction = unicode_bidi_class::L;
89
92 bool is_trailing_white_space = false;
93
100 bool glyph_is_initial = false;
101
102 [[nodiscard]] text_shaper_char(hi::character const& character) noexcept :
103 character(character),
104 bidi_character(character)
105 {
106 }
107};
108
109} // namespace hi::inline v1
Defines the standard HikoGUI character type.
DOXYGEN BUG.
Definition algorithm.hpp:13
Definition font.hpp:30
A rectangle / parallelogram in 3D space.
Definition rectangle.hpp:20
The standard HikoGUI character type.
Definition character.hpp:34
Definition text_shaper_char.hpp:15
Definition text_style.hpp:15
T max(T... args)