We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e09de03 + ac41041 commit 221465aCopy full SHA for 221465a
tests/LabelTest/LabelTest.js
@@ -874,8 +874,13 @@ var LabelTTFChinese = AtlasDemo.extend({
874
this._super();
875
var size = director.getWinSize();
876
var label = cc.LabelTTF.create("中国", "Microsoft Yahei", 30);
877
- label.setPosition(cc.p(size.width / 2, size.height / 2));
+ label.setPosition(cc.p(size.width / 2, size.height / 3 * 2));
878
this.addChild(label);
879
+
880
+ // Test UTF8 string from native to jsval.
881
+ var label2 = cc.LabelTTF.create("string from native:"+label.getString(), "Microsoft Yahei", 30);
882
+ label2.setPosition(cc.p(size.width / 2, size.height / 3));
883
+ this.addChild(label2);
884
},
885
title:function () {
886
return "Testing cc.LabelTTF with Chinese character";
0 commit comments