arabic-rt — Arabic shaping, BiDi & un-baking


Correct Arabic text anywhere in Unity. Bake logical Arabic to visual order so it renders on naive UI, and un-bake back to logical for TTS/search. Pure C#, no dependencies, Mono + IL2CPP.


by arabic-rt


Price History +

Arabic in Unity breaks in the usual places: custom mesh text, naive chat overlays, some bitmap-font pipelines, exported logs. Letters come out disconnected and left-to-right because nothing applied shaping (contextual letter forms) and bidi (right-to-left ordering). The long-standing "Arabic Support" assets tackle shaping but are largely unmaintained and have known correctness gaps.


arabic-rt is a small, modern, dependency-free engine that fixes this two ways:


- Fix bakes logical Arabic into visual presentation forms in correct visual order, so it displays correctly on any renderer, even one that does no Arabic processing.

- Unfix un-bakes baked/visual Arabic back to clean logical order, which is what you need for text-to-speech, search indexing, analytics, and storage.


It is pure C# (no native plugins), works on Mono and IL2CPP, and its output is byte-identical to the Python arabic-rt package, so you can bake text on a server and have it read correctly in the Unity client, or vice-versa.


Key features:

- Renders Arabic correctly even where Unity does not, with one call: Arabic.Fix(text).

- Reversible: Arabic.Unfix restores clean logical order for TTS, search, analytics, and logging. Unfix(Fix(x)) == x.

- Game-chat preset (Options.Game) tuned for word-by-word readers.

- Pure C#, zero dependencies. Mono + IL2CPP. Targets netstandard2.0 and 2.1.

- Cross-language parity with the Python arabic-rt and NuGet ArabicRt packages.

- TextMeshPro example plus a one-click demo scene (Tools > arabic-rt > Build Demo Scene).

- Fine control: shaping-only mode, per-word vs full-line bidi, line wrapping, and LTR/number-run preservation.

- Tiny, auditable single source file.


A note on fonts: arabic-rt produces correct text; how it looks is your font's job. For best results, assign a Naskh TextMeshPro font asset such as Noto Naskh Arabic or Amiri (both free, SIL OFL). This asset ships no fonts.


Built by Bandar AlSwyan, author of the open-source arabic-rt engine (Python, .NET, and Unity).