Home▸Computer Science▸Bidi Reordering Lab (2D): The Unicode Bidirectional Algorithm

Bidi Reordering Lab (2D): The Unicode Bidirectional Algorithm

2D companion to the 3D Bidi Reordering Lab: build a mixed left-to-right / right-to-left token sequence and watch an independently computed Unicode Bidirectional Algorithm (UAX #9) engine assign embedding levels and reorder it for display, with pan and zoom over the logical-to-visual thread diagram.

Computer Science2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-mobile-localization ↗ Open standalone

Localizing a mobile app for Arabic or Hebrew users is not just translation — text that mixes right-to-left words with left-to-right words and numbers has to be reordered for display while its underlying storage order never moves, or copy-paste, search and screen readers all break. This 2D companion to the 3D Bidi Reordering Lab keeps the same real embedding-level assignment and L2 reversal rule from the Unicode Bidirectional Algorithm (UAX #9), computed independently with its own top-down diagram: build a token sequence of Latin words, Arabic/Hebrew words and numbers, choose a left-to-right or right-to-left paragraph base, and watch the scene compute embedding levels (block height) and the resulting visual permutation, with connecting threads showing exactly which storage slot maps to which screen slot. Pan and zoom the diagram directly with drag and scroll/pinch.

⚙ Under the hood

2D companion to the 3D Bidi Reordering Lab: build a mixed left-to-right / right-to-left token sequence and watch an independently computed Unicode Bidirectional Algorithm (UAX #9) engine assign embedding levels and reorder it for display, with pan and zoom over the logical-to-visual thread diagram.

localizationi18nunicodertlalgorithmstext-rendering

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)