I have been trying to use a custom font[1] in my game and I have managed to use it in Android and web but not in IOS.
I have my xcode project like this:
http://discuss.cocos2d-x.org/uploads/default/9079/0e7bfa08016642fa.png
But I have tried writing only Soup of Justice in xcode but that did not work.
In my cocos studio project I have in resource.js:
font: 'res/Fonts/Soup of Justice.ttf' and it's preloaded in the main.js
Then my calls of cc.LabelTTF : var label = new cc.LabelTTF("Prueba" , "Soup of Justice", 50); but i have also tried var label = new cc.LabelTTF("Prueba" , 'res/Fonts/Soup of Justice.ttf', 50);
Any help would be welcome!
This is the link that should help you, and get you on roll...
Use the code written below to print all the fonts and search for the one you want to use.
for (NSString* family in [UIFont familyNames])
{
NSLog(@"%@", family);
for (NSString* name in [UIFont fontNamesForFamilyName: family])
{
NSLog(@" %@", name);
}
}