Game Development

Using Arabic Fonts & Text Shaping in Unity

Nesto your best freind

July 13, 2026

0 likes5 min read

Getting Arabic fonts in Unity to render correctly trips up almost every developer the first time — the letters show up disconnected, reversed, or as empty squares. The fix is a chain of three things done right: a font that actually contains Arabic glyphs, a TextMesh Pro font asset built to include those glyphs, and a shaping layer that joins and reorders the letters before they reach the screen.

This guide is the font-and-TMP half of Arabic support. For layout mirroring, numerals, and a full localization workflow, read Arabic game localization & RTL; here we stay focused on why the text itself looks wrong and how to make every letter connect.

Why Arabic looks broken in Unity

Three separate failures produce three different symptoms, and knowing which one you have saves hours:

  • Disconnected, isolated letters — the font renders each code point in its standalone form because nothing shaped the string. Arabic is cursive: every letter has up to four forms (isolated, initial, medial, final) and the engine must pick the right one based on neighbours. Unity's UI text does not do this on its own.
  • Empty boxes or "tofu" squares — the glyph is missing from the font atlas. The shaper asked for a glyph your font asset never baked.
  • Reversed word order — the bidirectional (bidi) algorithm never ran, so a right-to-left run got drawn left to right.

You must solve all three. Miss shaping and you get spaghetti; miss the atlas and you get boxes; miss bidi and the sentence reads backwards.

Pick a font that actually has Arabic glyphs

Not every font labelled "supports Arabic" contains what Unity's shaping approach needs. There are two style families: Naskh (traditional, readable, best for body text — Noto Naskh Arabic, Amiri) and Kufi/geometric (modern UI look — Cairo, Tajawal, Almarai). All four are freely licensed under SIL Open Font License, which matters for a shipped game.

The non-obvious requirement: because the common Unity plugins reshape text into Arabic Presentation Forms (the pre-shaped isolated/initial/medial/final glyph variants), your font should contain those presentation-form code points, not only the base letters plus OpenType shaping tables. Classic fonts like Amiri and the Noto Arabic family include them; some ultra-modern fonts ship only base glyphs and break with the presentation-form workflow. If letters connect in a browser but not in Unity, this mismatch is usually why.

Build a TextMesh Pro font asset for Arabic

Use TextMesh Pro, not the legacy UI.Text — TMP's SDF rendering stays crisp at any scale and is where the plugins hook in. Then generate a font asset that includes the Arabic ranges:

  1. Drop your .ttf/.otf into the project, then open Window → TextMeshPro → Font Asset Creator.
  2. Set Source Font File to your Arabic font.
  3. Set Character Set to Unicode Range (Hex) and paste the ranges you need: 0020-007E (Latin), 0600-06FF (Arabic), 0750-077F (Arabic Supplement), FB50-FDFF (Presentation Forms-A), and FE70-FEFF (Presentation Forms-B). The presentation-form ranges are what make shaping possible.
  4. Choose Render Mode: SDFAA and an Atlas Resolution of 2048 × 2048 (bump to 4096 if glyphs get cut off), with Padding around 5 to avoid blurry edges.
  5. Click Generate Font Atlas, then Save the asset.

Better still on Unity 2020.1+ / TMP 2.1 and newer: set the font asset's Atlas Population Mode to Dynamic. A dynamic SDF font asset renders missing glyphs at runtime straight from the source font, so you get full Arabic coverage without pre-baking a giant static atlas — ideal for user-generated names and chat.

Add shaping and RTL with RTLTMPro

TextMesh Pro draws glyphs but does not shape or reorder Arabic. Add the open-source RTLTMPro plugin (install via Package Manager → *Add package from git URL*, or OpenUPM). It swaps the standard TMP component for an RTLTextMeshPro component that takes your logical string and outputs a shaped, correctly ordered one.

Key inspector options:

  • Preserve Numbers — keep Western digits (1, 2, 3) instead of converting to Arabic-Indic.
  • Farsi — toggle Persian vs Arabic digit and glyph behaviour.
  • Fix Tags — keep rich-text tags like <color> intact through the reshaping.
  • For runtime strings from code, set .text as usual on the RTL component and it reshapes on assignment.

If you build a custom or WebGL text path instead, run each string through HarfBuzz for shaping and a Unicode bidi implementation for ordering — that is exactly what the plugins wrap.

Common gotchas and fixes

  • Tofu squares in the middle of words — a presentation-form glyph is missing; widen your Unicode ranges or switch to a dynamic font asset.
  • Blurry Arabic — atlas resolution too low or point size too small; raise the atlas to 4096 and increase padding.
  • Tashkeel (diacritics) clipped or overlapping — increase line height and padding; test with fully vowelled strings, not just plain text.
  • Faux bold looks mangled — Arabic doesn't degrade well under synthetic bold; ship a real bold weight as a separate font asset.
  • Mixed Arabic + English + emoji — set a fallback font asset list on your primary asset so TMP pulls Latin and emoji glyphs from other fonts when the main one lacks them.

Ship it and test with real players

Once Arabic renders cleanly in the Editor, prove it in a real browser — the WebGL text stack has its own quirks and only shows the truth on screen. Export your build and publish it on The Gaming Nest: Arab players open it instantly in the browser with no download, and you get native-speaker feedback on your fonts fast. Upload your WebGL game, or join the next game jam and put your Arabic UI in front of a live crowd. Start with our overview of game development in the Arab world if you want the bigger picture first.

Tags

#Unity#تشكيل النص#الخطوط العربية#TextMesh Pro#RTLTMPro#Arabic fonts

About the Author

Nesto your best freind

Article Summary

Arabic text broken or disconnected in Unity? Fix letter shaping and RTL with TextMesh Pro, the right font, dynamic font assets, and the RTLTMPro plugin.

Views

0

0 comments
Share this article:

Comments

Share your thoughts about this article

Comments(0)

Sign in to add a comment. Login

Loading...