57 constexpr bool is_rtl() const noexcept {
return (
level & 1u) == 1u; }
81 static std::vector<BidiRun>
visual_order(
const std::vector<BidiRun>& runs);
static std::vector< BidiRun > visual_order(const std::vector< BidiRun > &runs)
Re-order runs (in logical order, as returned by analyze) into visual / paint order via UBA rules L1-L...
static BidiParagraph analyze(std::string_view text, BidiBaseDirection base_direction=BidiBaseDirection::Auto)
Analyze one paragraph of UTF-8 text.
static bool has_sheenbidi() noexcept
True when the build links SheenBidi.
Definition affine_transform.hpp:24
BidiBaseDirection
Paragraph base direction selector (UBA rule P2/P3 surfaces).
Definition bidi.hpp:42
@ Auto
Run UBA rule P2 (first strong character).
Definition bidi.hpp:43
@ LTR
Force paragraph level 0.
Definition bidi.hpp:44
@ RTL
Force paragraph level 1.
Definition bidi.hpp:45
@ text
Definition scene_node.hpp:96
Aggregate paragraph-level bidi result.
Definition bidi.hpp:62
std::vector< BidiRun > runs
Logical order.
Definition bidi.hpp:64
bool used_sheenbidi
False on the pass-through.
Definition bidi.hpp:65
std::uint8_t base_level
Definition bidi.hpp:63
One contiguous span of text that shares a single bidi embedding level.
Definition bidi.hpp:52
std::uint8_t level
0 = LTR; odd levels (1, 3, …) = RTL.
Definition bidi.hpp:55
std::uint32_t start
Definition bidi.hpp:53
constexpr std::uint32_t end() const noexcept
Definition bidi.hpp:58
constexpr bool is_rtl() const noexcept
Definition bidi.hpp:57
std::uint32_t length
Definition bidi.hpp:54