bidi: incorrect ordering of bi-directional line
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.1k
- Forks
- 348
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 3
Description
Using [this SVG](https://upload.wikimedia.org/wikipedia/commons/9/9b/SVG_Test_TextAlign.svg),
Firefox renders like this:

Resvg renders like this:

KAS-text renders like this:

And QT renders like this:

Bonus: Libreoffice:

The text is split at word boundaries as follows (more granularity than required):
```
level: Level(1) num glyphs: 2 text: نص
level: Level(1) num glyphs: 1
level: Level(1) num glyphs: 7 text: المرساة
level: Level(1) num glyphs: 1
level: Level(2) num glyphs: 2 text: 15
level: Level(1) num glyphs: 1
level: Level(2) num glyphs: 2 text: kV
```
According to the [Unicode BIDI algorithm](http://www.unicode.org/reports/tr9/#L2), Firefox and KAS-text are the only correct entries here.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the ordering difference with the linked SVG and compare the rendered line with the Unicode BIDI algorithm and the Firefox/KAS-text examples. Trace the Rust text-layout path responsible for bidirectional line ordering; done means the output follows the algorithm’s expected ordering for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100