c++ - How to get `Label::createWithTTF` to support RTL languages such as arabic -
firstly, i'm using cocos2d-x v3.6
, visual studio 2013
uses(utf-8 without signature option) , c++
.
when using label::createwithttf
method write arabic text, appear following.
the previous arabic text has not been written correctly, supposed السلام عليكم
, , supposed arabic language belong unicode encoding.
my code:
auto label = label::createwithttf("السلام عليكم", "fonts/arial.ttf", 34);
is there way solve problem ?
edit:
i have applied in link [ right-to-left mark ] , result disappearance arabic text in following picture.
the code:
auto label = label::createwithttf("\u200fالسلام عليكم", "fonts/arial.ttf", 34); label->setalignment(texthalignment::right);
the problem still exists.
try using label::createwithsystemfont instead of label::createwithttf. solved problem rtl.
Comments
Post a Comment