Replies: 6 comments 21 replies
-
@Arvant I'm just a contributor to the engine code, and not involved in planning core features. Regardless of whether or not it is something planned in the engine, you can always have a go at implementing it yourself and submitting a PR to add that functionality. |
Beta Was this translation helpful? Give feedback.
-
Axmol does support RTL, you can use unfortunately as with any engine in life that supports RTL languages some work has to be done on the CPU to shape those characters, I noticed in games where I select arabic language my performance degrades a bit when viewing arabic UI, so if you implement your reshaper or harfbuzz you should expect some performance loss. other than that you can use this useful site https://www.compart.com/en/unicode/, it will help immensely when building your own reshaper, just look at your languages character set and see which characters interconnect and what not, as for harfbuzz it's a bit complicated, I'd advice you to try to get it to work in a standalone c++ project and then try to glue it with axmol as an extension. |
Beta Was this translation helpful? Give feedback.
-
and use this function:
|
Beta Was this translation helpful? Give feedback.
-
@armanhossiny ok Fixed. I've made some changes in arabic-text-renderer-cpp-axmol, you can recopy the file. It was because when using TTF fonts, a square is rendered instead of disregarding the zero width character itself which in this case is ShapingEngine::Options::_discardChars = true;
auto text = std::wstring(L"اختب\u200Cار");
auto label = Label::createWithTTF(ShapingEngine::render(text, true), "bitsy-font-with-arabic.ttf", 48); Keep in mind that the discard step is some kind of a "post-process" step, after the engine shapes the characters it will remove those characters set for discarding, and the shaping information of the characters left isn't lost and still retained. hence the reason I got the characters to separate with no |
Beta Was this translation helpful? Give feedback.
-
hi DelinWorks when use mixed languages (english and arabic or farsi) don't show correct, e.x: |
Beta Was this translation helpful? Give feedback.
-
Hi.
Godot in new version(4) added Harfbuzz to engine core and now support RTL languages.
godotengine/godot#41100
https://godotengine.org/article/complex-text-layouts-progress-report-1/
I use reshaper for this problem but it not work well and the best way to do it is use Harfbuzz in Core of axmol.
have you any plan to do it?
@halx99
@rh101
Beta Was this translation helpful? Give feedback.
All reactions