This plugin adds Right-to-left language support to "TextMeshPro" Unity plugin.
You need to have TextMeshPro
plugin in your project. You can install TMPro via Package Manager
.
Currently Arabic, Farsi and Hebrew are supported. If you find an issue with one of these languages or want support for another RTL language, open an issue.
You don't need to convert, copy and paste texts. Start writing and texts will be converted right away.
All Text Mesh Pro
's tags are available in RTL Text Mesh Pro
Realtime InputField is supported.
Yes, This plugin has no problem with multiline RTL texts.
Auto Font Size is fully supported.
Arabic tashkeel are supported.
You can insert Zero-Width No-Joiner character with Ctrl+Shift+2 hotkey.
You need to have
TextMeshPro
plugin in your project. You can install TMPro viaPackage Manager
. DO NOT Install Text Mesh Pro from Asset Store.
Download the latest unitypackage file from the releases section and import it into your project from "Assets -> Import Package -> Custom Package..." menu in Unity.
hk1ll3r maintains a package manager version of this repo on OpenUPM.
In Project Settings window, add OpenUPM as a scoped registry or if you have already added it, add the new scope to it.
Then in Package Manager window, change scope to My Registries. Select "RTL Text Mesh Pro" package and press Install.
The sample scenes and demo resources (fonts, shaders, etc.) are included in the package as a .unitypackage file. You need to import those into your Assets folder to use them. From the project window navigate to the package folder and double click "RTLTMPRo-demo-resources" file to import these assets into your project.
You need to create font assets from font files to use them with TextMeshPro. Here are basic instructions for convenience. You can check out the official TextMeshPro documentation to learn more.
Open Window/TextMeshPro/Font Asset Creator
window.
Font Source
field (Your font must include your characters)Character Set
to Unicode Range
.Assets/RTLTMPro/Ranges
folder into Character Sequence (Hex)
.
ArabicLetters.txt
fileArabicDigits.txt
fileArabicTashkeel.txt
file.ArabicAll.txt
. Normally you would use this to create your font asset.HebrewLetters.txt
.Generate Font Atlas
button and wait for it to generate the atlas.Save TextMeshPro Font Asset
and save the font asset.GameObject/UI/* - RTLTMP
menu to create RTL UI elements. (Alternatively you can replace Text Mesh Pro UGUI
components with RTL Text Mesh Pro
)Font Asset
property in RTL Text Mesh Pro
componentRTL TEXT INPUT BOX
secion.When checked, English numbers will be converted to Farsi numbers. When unchecked, English numbers will be converted to Arabic numbers.
When checked numbers will not be converted.
RTL Text Mesh Pro does not fix texts that start with English characters.
Checking this checkbox forces RTL TextMeshPro to fix the text even when it starts with English character.
Multiline English texts will have problem on components that have ForceFix
checked.
When checked, RTL Text Mesh Pro will try to fix rich text tags.
text
property of TextMeshProUGUI
. But the text
property is not defined virtual
. You need to manually make the property virtual.
TMP_Text.cs
from TextMeshPro source codeRTLTextMeshPro.cs
and uncomment the top line where it says //#define RTL_OVERRIDE
All contributions are welcome. Make sure you follow the project's code style. We actively monitor pull requests.
Contact: