UDocBidi class abstract

Recovers logical (reading) order from visually ordered text pieces.

PDF glyphs are positioned visually, left to right. Unicode's bidi algorithm turns logical text into visual order by reversing runs of embedding level >= k for k = max..1; applying those same reversals for k = 1..max undoes it. Levels are estimated per piece: RTL letters are odd, Latin letters in an RTL paragraph and digits inside RTL text are raised to an even level so numbers such as "۱۴۰۳" or "2024" keep their left-to-right order.

Constructors

UDocBidi()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

mirror(String text) → String
reorder(List<String> visual, {required bool baseRtl}) → (List<int>, List<int>)
Returns (logical order indexes, embedding level per original index).