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.
Michael's answer works on my Android, but does not work in my browser.
I could not find a multi-purpose method, but adding this in the head of index.html
worked for my browser:
with this in your js:
var titleLabel = new cc.LabelTTF("Hello World", "Lobster", 72);
Since this method only works in my browser, and the other method only works on my phone, I might need to come up with a toggle.