I’ve released a small open-source RTL text helper library for Defold, focused on Persian (Farsi) and Arabic UI text rendering.
Defold doesn’t provide native shaping for RTL languages, so this library handles character shaping and RTL ordering in Lua, making it possible to correctly display Persian/Arabic text in GUI nodes.
Features
Correct RTL rendering for Persian & Arabic
Proper character shaping (isolated / initial / medial / final)
Today I was able to test version 1.12.1
But it doesn’t seem to display RTL texts correctly.
In fact, I don’t see any difference
Do I need to take any special steps to enable RTL text?
I also don’t see anything about RTL support in the link you sent.
Due to the added engine size the feature comes with, we decided to not include it “by default”.
This means you will need to use an app manifest to include it.
It’s mentioned in the release notes as "Added support for text shaping" where RTL is one use case.
To enable the feature, you need to:
set the font.runtime_generation = 1 in game.project to use .ttf fonts at runtime.
use an app manifest, selecting the “Font Layout” feature.
We haven’t finished our example project yet, but in the meantime there is a test project here:
Note that I linked to the data-only branch. The main branch still uses the older version of this feature, but is deprecated and isn’t supported in 1.12.*
Also, make sure to use the 1.12.0 Beta version for now. (I noticed that the 1.12.1 alpha is not working correctly with this example for some reason, I’m working on that)