HeshamRTL

Type Arabic into a TextMeshPro text the way it is written. HeshamRTL joins the letters, lays the line out right to left and wraps it correctly, while your game runs.

Built from text that shipped broken. The demo includes Arabic from two commercial games released with official Arabic support, where every word came out backwards or as unreadable letters, next to the same text drawn by HeshamRTL. Their text was stored correctly; it broke while the game drew it.

Everything that breaks with pre-converted strings keeps working

  • Player names, numbers, string.Format, SetText("{0}", score), text built at run time.
  • Wrapping by TextMeshPro's own right-to-left layout: lines read top to bottom at any resolution, box size or auto-size.
  • Your string tables keep plain Arabic; nothing is stored reversed.
  • One object for every language: English and the rest pass through untouched, alignment mirrors itself for Arabic.

No setup per text Add one Arabic Text Settings component to your first scene and every TextMeshPro text that shows Arabic is handled before its first frame. Or add the component to the texts you choose; it previews in the editor without Play mode.

Already using RTLTMPro? Keep your project. HeshamRTL draws every RTLTextMeshPro text from the Arabic you typed and ignores RTLTMPro's conversion: Arabic yeh and Latin digits stay as typed, brackets your translators typed backwards are put right, your alignment is kept. An editor report lists every RTLTMPro text and the ones with reversed brackets.

Correct Arabic

  • Letter joining, lam-alef, harakat, tatweel.
  • Numbers and English inside Arabic in the right order: the Unicode Bidirectional Algorithm, passing all 91,707 cases of Unicode's official BidiCharacterTest.
  • Rich text tags (<color>, <b>, <link>, <sprite>) kept valid.

Light Text that does not change costs nothing; shaping a text allocates only its result string. 200 UI texts changed every frame: English 2.8 ms, Arabic 3.8 ms.

Also

  • Old uGUI Text: a drop-in Arabic Legacy Text component, wrapping and Best Fit included.
  • TextMesh and any other renderer: one call.
  • Pseudo-Arabic mode to check your layout before the translation exists.
  • Noto Kufi Arabic (Google, Open Font License) included with a ready TextMeshPro font asset, set up as a fallback in one click.

Not supported

  • Typing Arabic into input fields (TMP_InputField). Displaying Arabic works everywhere.
  • UI Toolkit (use Unity's own Arabic support there).