Bidirectional Algorithm: Internal Concepts
Types: Detailled classification of characters into types
- Strong: L (ltr), R (rtl), AL (rtl Arabic Letters),...
- Weak: EN (European number),...
- Neutral: WS (whitespace), ON (other neutral),...
- Assign types based on characters
- Resolve types based on proximity (weak and neutral types near ltr
- Starts at 0, theoretical max is 62
- Even means LTR
- Odd means RTL
- Assign levels from base directionality, embeddings, and
- Use level runs for resolving implicit types
- Increase levels based on resolved types
- Invert level runs in decreasing order, decrementing level by