Hi, I want to use gideros to make local games and i love it!
But after study and test, i found that the gideros cannot show the persian or arabic language words correctly.
I've also working with Corona SDK and it has no problem with this issue! since this problem is not from LUA language.
The issue is that these languages are "right to left" and also the letters can be bounded if have no space between them and each letter may have several types of writing to be display .
As you see in the image i attached, the sample word that is in the right side (number 2) is the correct form in persian and the other word in the left side is the same word output in gideros player.
Related code :
local font = TTFont.new("BNazanin.TTF", 120)
local textfield = TextField.new(font,"سلام")
textfield:setX(100)
textfield:setY(300)
stage:addChild(textfield) |
Any one have any idea to how fix this problem?
I know persian and arabic languages very well and I am a volunteer for help to resolve this problem.
Thanks!
Comments
We could use some third party layouter, like http://www.pango.org/
or we need to implement it our selves:
https://www.freetype.org/freetype2/docs/glyphs/glyphs-5.html#section-4
I only don't know how to understand automatically when to use left to right and viceversa
Likes: SinisterSoft
http://unicodelookup.com/#سلام/1
Whereas individual forms are showed here: https://en.m.wikipedia.org/wiki/Arabic_(Unicode_block)
If I converted your letters correctly, you use unicodes 0633 0694 0627, but I don't know the rules to find actual relevant presentation forms. And of course gideros needs to be fixed to support RTL layout...
BTW, please don't reject answers unless they are out of topic, it make me feel like I told wrong things while I am just trying to explain you what happens here, so that you can work out a solution yourself. For example, you could work around the problem by creating one textfield by letter and lay them out yourself in a RTL fashion.
Likes: talis
https://deluxepixel.com