Owns stable Unicode scalar storage and resolved paragraphs. No library handle escapes.
More...
#include "donner/svg/text/BidiParagraph.h"
|
| struct | Run |
| | One level run of a line, returned in left-to-right visual order. More...
|
| struct | InjectedControl |
| | A control that an inline element's unicode-bidi places around its content. It takes part in analysis but occupies no scalar index, so levels and runs describe only the scalars. More...
|
|
|
| BidiParagraph (BidiParagraph &&) noexcept |
|
BidiParagraph & | operator= (BidiParagraph &&) noexcept |
|
| BidiParagraph (const BidiParagraph &)=delete |
|
BidiParagraph & | operator= (const BidiParagraph &)=delete |
| std::optional< std::vector< Run > > | visualRuns (uint32_t start, uint32_t end, BidiResourceBudget &budget) const |
| | Resolve L1/L2 for a logical line; source paragraphs never reorder across each other.
|
|
uint8_t | levelAt (uint32_t index) const |
| | Resolved level before line-specific trailing-space resets.
|
|
uint8_t | paragraphLevelAt (uint32_t index) const |
| | Resolved base level of the source paragraph containing the scalar.
|
|
| static std::optional< BidiParagraph > | Analyze (std::vector< char32_t > codepoints, BidiResourceBudget &budget, uint8_t base=0, bool forceAnalysis=false, bool override=false, std::span< const InjectedControl > controls={}) |
| | Analyze Donner-decoded scalars. Base 0/1 is explicit; 2 requests first-strong detection.
|
|
static bool | NeedsAnalysis (char32_t codepoint) |
| | Whether a scalar can require right-to-left analysis at explicit base zero.
|
|
static bool | IsControl (char32_t codepoint) |
| | Whether a source character affects bidi but consumes no SVG or DOM character index.
|
|
static bool | IsNonspacing (char32_t codepoint) |
| | Whether the scalar is a nonspacing mark that stays attached to its preceding base.
|
|
static char32_t | Mirror (char32_t codepoint) |
| | Unicode L4 mirror; characters without a paired mirror remain unchanged.
|
|
static uint32_t | StrongScript (char32_t codepoint) |
| | Four-letter ISO 15924 tag of a strong script, or zero for script-neutral scalars.
|
Owns stable Unicode scalar storage and resolved paragraphs. No library handle escapes.
◆ donner::svg::BidiParagraph::Run
| struct donner::svg::BidiParagraph::Run |
One level run of a line, returned in left-to-right visual order.
| Class Members |
|
uint32_t |
end = 0 |
|
|
uint8_t |
level = 0 |
|
|
uint32_t |
start = 0 |
|
◆ donner::svg::BidiParagraph::InjectedControl
| struct donner::svg::BidiParagraph::InjectedControl |
A control that an inline element's unicode-bidi places around its content. It takes part in analysis but occupies no scalar index, so levels and runs describe only the scalars.
| Class Members |
|
uint32_t |
before = 0 |
Scalar index the control precedes; the scalar count for the end. |
|
char32_t |
codepoint = 0 |
An explicit embedding, override, isolate or pop control. |
◆ Analyze()
| std::optional< BidiParagraph > donner::svg::BidiParagraph::Analyze |
( |
std::vector< char32_t > | codepoints, |
|
|
BidiResourceBudget & | budget, |
|
|
uint8_t | base = 0, |
|
|
bool | forceAnalysis = false, |
|
|
bool | override = false, |
|
|
std::span< const InjectedControl > | controls = {} ) |
|
static |
Analyze Donner-decoded scalars. Base 0/1 is explicit; 2 requests first-strong detection.
- Parameters
-
| codepoints | Owned scalars, which remain pinned throughout analysis and line queries. |
| budget | Cumulative admission shared by the caller's layout. |
| base | Paragraph base direction: 0 for direction: ltr, 1 for rtl. |
| forceAnalysis | Whether to bypass the equivalent all-left-to-right fast path. |
| override | Whether every scalar takes the explicit base level without reordering by bidi type, as unicode-bidi: bidi-override on the paragraph's block container. Requires base 0 or 1. |
| controls | Injected controls in nondecreasing InjectedControl::before order. Each counts against the scalar budget, as does the leading control that carries a paragraph override when anything is injected. Controls nested inside an override, injected or in the source, still open levels. With no scalars the controls enclose nothing and are dropped. |
◆ visualRuns()
| std::optional< std::vector< Run > > donner::svg::BidiParagraph::visualRuns |
( |
uint32_t | start, |
|
|
uint32_t | end, |
|
|
BidiResourceBudget & | budget ) const |
Resolve L1/L2 for a logical line; source paragraphs never reorder across each other.
- Parameters
-
| start | First scalar of the line. |
| end | Exclusive scalar end. |
| budget | Shared visual-run admission. |
The documentation for this class was generated from the following file: