Can't load font in cocos2dxna

Topics: Content Building and Deploying
Dec 3, 2013 at 10:50 AM
Edited Dec 3, 2013 at 10:53 AM
Hi ,
Somebody help me. i can't load font in a cocos2dxna project
i put 2 files fnt and png into "Content"
and set BuildAction to "Content", Copyto output directory to " copy if newer"
here my code
CCLabelBMFont temp= CCLabelBMFont.labelWithString("0123456789", "fonts\bitmapFontTest4.fnt");
but it wasn't working. the error :"Error loading "fonts\bitmapFontTest4.fnt". File not found."


thanks!
Dec 3, 2013 at 5:55 PM
Edited Dec 3, 2013 at 6:23 PM
Coordinator
Dec 7, 2013 at 6:58 PM
exactly as oxosi suggests, or you could try loading your FNT file as a stream and bypass the content project path.