Cocos2d-js: How to use a custom ttf font on android devices?
问题 I use following code to display a custom ttf font: ml.score = cc.LabelTTF.create(ml.totalPoints.toString(), "fonts/American Typewriter.ttf", 60); ml.score.setPosition(ml.size.width/2,BS*0.6); ml.score.retain(); ml.score.setColor(cc.color(200,160,70)); ml.scoreBar.addChild(ml.score, 5); In Android the font is not displayed. In Chrome / Firefox browsers it is. I'm using cocos2d-js 30RC. Wat? 回答1: I made a mistake. The file name was wrong. It should be ml.score = cc.LabelTTF.create(ml