How to display Unicode string in with Lua in Cocos Code Ide -


i'm using cocos code ide create simple project lua. main.lua saved in utf-8 without bom , contains following snippet:

local label1 = cc.label:createwithttf("長い","fonts/marker felt.ttf",32); local label2 = cc.label:createwithttf("long","fonts/marker felt.ttf",32); local label3 = cc.label:createwithttf("rất dài","fonts/marker felt.ttf",32); 

label1 japanese string rendered correctly, label2 ansi string. however, label3 wasn't rendered correctly. in fact, rendered "rt dài".

i had tried use other unicode fonts has character. still, couldn't character rendered correctly. have done wrong?

i have same issue, , have solved. figure out that, font file marker felt.tff include in cocos project not unicode version. after while, have found unicode version of marker felt font in mac pc in: system/library/fonts/markerfelt.ttc

markerfelt unicode image


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -