Donner SVG main
0.8.0 ยท 382bd0190.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::svg::BidiParagraph Class Reference

Owns stable Unicode scalar storage and resolved paragraphs. No library handle escapes. More...

#include "donner/svg/text/BidiParagraph.h"

Classes

struct  Run
 One level run of a line, returned in left-to-right visual order. More...

Public Member Functions

 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 Public Member Functions

static std::optional< BidiParagraph > Analyze (std::vector< char32_t > codepoints, BidiResourceBudget &budget, uint8_t base=0, bool forceAnalysis=false)
 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.

Detailed Description

Owns stable Unicode scalar storage and resolved paragraphs. No library handle escapes.


Class Documentation

◆ 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

Member Function Documentation

◆ Analyze()

std::optional< BidiParagraph > donner::svg::BidiParagraph::Analyze ( std::vector< char32_t > codepoints,
BidiResourceBudget & budget,
uint8_t base = 0,
bool forceAnalysis = false )
static

Analyze Donner-decoded scalars. Base 0/1 is explicit; 2 requests first-strong detection.

Parameters
codepointsOwned scalars, which remain pinned throughout analysis and line queries.
budgetCumulative admission shared by the caller's layout.
baseParagraph base direction; normal SVG uses 0.
forceAnalysisWhether to bypass the equivalent all-left-to-right fast path.

◆ 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
startFirst scalar of the line.
endExclusive scalar end.
budgetShared visual-run admission.

The documentation for this class was generated from the following file: