Skip to content

Resolve bidi paragraph metadata - #337

Open
Happypig375 wants to merge 1 commit into
masterfrom
issue-289-bidi-paragraphs
Open

Resolve bidi paragraph metadata#337
Happypig375 wants to merge 1 commit into
masterfrom
issue-289-bidi-paragraphs

Conversation

@Happypig375

Copy link
Copy Markdown
Collaborator

Closes #289

Summary

  • expose explicit Auto/LTR/RTL paragraph direction and immutable UTF-16 logical run metadata
  • resolve every paragraph through already-vendored Typography/SheenBidi without reversing source strings
  • preserve CR, LF, CRLF, empty, and trailing paragraphs with global logical offsets
  • expose freshly resolved TextPainter metadata for its documented synthetic text projection; drawing stays unchanged pending Shape directional script runs with direction and cluster metadata #290 and Lay out and wrap resolved right-to-left text runs #291
  • reject invalid direction values and preserve the painter's LTR default independently of alignment

Validation

  • TestBidiParagraphs: 25 passed
  • Release CSharpMath.Rendering build: passed
  • scoped format verification and git diff --check: passed
  • independent public-API, architecture, and licensing review: approved

The representative Unicode 17 coverage includes BidiCharacterTest rows 46/47, 52/53, 143/144, 181/182, 197/198, 282/283, 293/294, and 304/305. It is intentionally not a claim of full UAX #9 conformance.

Dependency and license

No new package dependency is introduced. CSharpMath.Rendering already compiles the vendored SheenBidi implementation under Apache-2.0. The transcribed and modified Unicode 17 vector subset retains its source, version, row references, and Unicode License v3 notice in CSharpMath.Rendering.Tests/Unicode-Data-LICENSE.txt.

Visual shaping and visual-order line layout remain tracked by #290 and #291.

@github-actions github-actions Bot added the Type/Enhancement A concrete change to CSharpMath behavior or capability. label Aug 31, 2026
@Happypig375
Happypig375 force-pushed the issue-289-bidi-paragraphs branch from c2bd527 to a98055d Compare August 31, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type/Enhancement A concrete change to CSharpMath behavior or capability.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resolve text paragraphs with the Unicode Bidirectional Algorithm

1 participant