Kotaiba
November 5, 2014, 1:32pm
#1
Hi,
the arabic shows wrong on the Label .
So Cocos2d-x support arabic ?
this is how i add the Label .
Label* lab=Label::createWithTTF(“عربي”, “fonts/MyriadArabic-Bold.otf”, size.width/12);
lab->setPosition(Point(size.width/2,size.height/1.2));
this->addChild(lab,5);
thank you .
hzlov
November 5, 2014, 1:36pm
#2
Using non-ascii character on source code could show you wrong result.
Try make text file, load it and assign text.
Kotaiba
November 5, 2014, 2:23pm
#3
i did ,same result.
tried many fonts , when i use createWithSystemFont it works fine .i have no idea how to fix this .
Kotaiba
November 6, 2014, 1:20pm
#5
Solved, by adding the font to the info.plist.
I have the same problem,
on Android, if I used createWithSystemFont It works as should,
But any other thing like Label::create OR Label::createWithTTF it fails
on Linux ( Ubuntu ) All methods fail.
Does anyone have a clue about that,
Thanks !
nite
January 31, 2015, 8:54am
#7
Can you create an issue for this?
Also it will be great if you can provide the font file.
ArkaM
April 11, 2019, 8:55am
#8
Is there any fix for it yet?
Any way to have custom font support for Arabic without having to resort to the System Font?
Hi, I wrote a fix for Arabic and Persian support. It works 100% for Persian but may have issues with Arabic but are easy to fix. (I don’t know Arabic).
I cannot put link due to the cocos2d policy so in Github search for MohammadFakhreddin/cocos2dx-persian-arabic-support