[Bug?] Problem loading CCLabelTTF custom font on IOS

[Bug?] Problem loading CCLabelTTF custom font on IOS
0.0 0


#Hi, I got a problem loading my custom font on IOS, while using “fonts/ChocolateCoveredRaindrops.ttf” as font name works fine in android.

##cocos2dx version
v2.2.0 / v2.2.2 (tried both, for some reason I should choose a stable version)

##xcode version: 5.0.2

##put font file
ChocolateCoveredRaindrops.ttf in Resources/fonts/ChocolateCoveredRaindrops.ttf

##added to Resources in xcode as a reference folder(blue rather than yellow)

##font info shown in font book
PostScript name ChocolateCoveredRaindrops
Full name ChocolateCoveredRaindrops
Family ChocolateCoveredRaindrops
Style Medium
Kind TrueType
Language Afrikaans, Albanian, Asu, Basque, Bemba, Bena, Chiga, Congo Swahili, Cornish, Danish, Dutch, English, Faroese, Filipino, Galician, German, Gusii, Icelandic, Indonesian, Irish, Italian, Kabuverdianu, Kalenjin, Kinyarwanda, Luo, Luyia, Machame, Makhuwa-Meetto, Makonde, Malagasy, Malay, Manx, Morisyen, North Ndebele, Norwegian Bokmål, Norwegian Nynorsk, Nyankole, Oromo, Portuguese, Rombo, Rundi, Rwa, Samburu, Sango, Sangu, Sena, Shambala, Shona, Soga, Somali, Spanish, Swahili, Swedish, Swiss German, Taita, Teso, Vunjo, Zulu
Script Latin
Version Version 001.000
Location /Users/ce.zheng/Library/Fonts/ChocolateCoveredRaindrops.ttf
Unique name Vanessa Bays: Chocolate Covered Raindrops
Designer Vanessa Bays
Copyright Vanessa
License Free for personal use. Commercial use requires a license to be purchased at http://bythebutterfly.com
Enabled Yes
Duplicate No
Copy protected No
Glyph count 203

info.plist relevant part:


I tried all these font names, all of which end up the same in the system default font.

    CCLabelTTF* pp = CCLabelTTF::create("ChocolateCoveredRaindrops.ttf", "ChocolateCoveredRaindrops.ttf", 24);
    pp->setPosition(ccp(WW * 0.5, WH * 0.1));
    CCLabelTTF* pp2 = CCLabelTTF::create("ChocolateCoveredRaindrops", "ChocolateCoveredRaindrops", 24);

    pp2->setPosition(ccp(WW * 0.5, WH * 0.3));
    CCLabelTTF* pp3 = CCLabelTTF::create("fonts/ChocolateCoveredRaindrops.ttf", "fonts/ChocolateCoveredRaindrops.ttf", 24);
    pp3->setPosition(ccp(WW * 0.5, WH * 0.5));
    CCLabelTTF* pp4 = CCLabelTTF::create("fonts/ChocolateCoveredRaindrops", "fonts/ChocolateCoveredRaindrops", 24);
    pp4->setPosition(ccp(WW * 0.5, WH * 0.7));

##tried all following links, no luck:



##Does anyone knows how to solve this problem, or is it a bug in the 2.2.x version?

##Thank you!

Screen Shot 2014-03-04 at 10.21.59 AM.png (17.2 KB)

Screen Shot 2014-03-04 at 10.28.18 AM.png (17.4 KB)

Screen Shot 2014-03-04 at 10.22.24 AM.png (25.2 KB)

ChocolateCoveredRaindrops.ttf.zip (22.5 KB)

What is the correct way to use a custom font in IOS?

I have the same problem! Can anyone tell how to solve this?

Thank you!