I’m new to PlayCanvas and would like some assistance getting Arabic text showing properly in my project.
I did the following:
created a text object
imported an Arabic font into the project
added the required unicode ranges to the font to support Arabic characters
clicked on “process font”
typed in an Arabic word “عربي”
adjusted the camera to view the Arabic text
previewed my project
While Arabic letters do show up, they appear (1) disjointed and (2) from left-to-right. I have added a screenshot and some links below.
Does PlayCanvas support Arabic text? Does it support rendering of right-to-left (RTL) languages like Arabic? Please advise. Thanks!
We’re looking at supporting Arabic RTL at the moment actually. We’re in an exploratory phase at the moment, but hopefully we can get this implemented in the near future.
That’s great to hear! Thanks for your quick reply.
Here are some links that may help your team in implementing this needed feature:
Unicode ranges for Arabic/Persian characters:
As of Unicode 11.0, the Arabic script is contained in the following blocks:
The basic Arabic range encodes the standard letters and diacritics, but does not encode contextual forms (U+0621–U+0652 being directly based on ISO 8859-6); and also includes the most common diacritics and Arabic-Indic digits.
The Arabic Supplement range encodes letter variants mostly used for writing African (non-Arabic) languages.
The Arabic Extended-A range encodes additional Qur'anic annotations and letter variants u...
As a native Arabic speaker, I can try my best to answer any questions you may have on how to choose the correct Arabic letter form depending on the letter’s state within the text (i.e. by looking at the letter/diacritic/character before and after it) and I can also assist with testing/troubleshooting. Please let me know if I can be of any guidance!
Thanks for the help and advice
@bsweileh! We’ll be in touch if we need further assistance.
Maybe I’m a bit too late, but it worked for me after some trials and errors!
First you need to convert the Arabic Text to RTL, there are many tools that can help with that like:
Then you have to make sure your font supports all the generated Unicode letters. I used a Unicode converter to know the codes for my letters and filled them using FontForge
Convert Unicode characters in UTF-16, UTF-8, and UTF-32 formats to their Unicode and decimal representations and vice versa. In addition, percent encode/decode URL parameters. The converter happens automatically.
After exporting the font and using the converted text instead of the original, it worked perfectly
Hello! Given the recent work on the localisation feature, I wonder if there’s inbuilt support for RTL text at this time?