Search code examples
cocos2d-xcocosbuilder

Where to save CCLabelBMFont resources for many resolutions


I am using cocos2d-x and cocosbuilder 3.0 alpha2. It is very convenient to use auto scaled sprites in cocosbuilder. You can add png files under resources-auto directory and content will be automatically scalled during publishing. You don't have to scale images programmatically.

I would like to use CCLabelBMFont for old and new iPhone. I was trying to use the same method for fnt files. I saved fnt files under resources-auto directory. Then I opened these resources by cocosbuilder and it crashed ;/

Where should I save these fnt files ? Should I create two version of fnt files (regular and retina) ? How to use CCLabelBMFonts for many display resolutions ?


Solution

  • First, I would strongly recommend updating to the latest version of CocosBuilder as it fixes some issues with the automatic resizing of assets.

    CocosBuilder can only automatically resize image resources. To add support for different sized fonts you will need to place them (save different sizes from your font creation tool) in folders called resources-iphone, resources-iphonehd, resources-ipad or resources-ipadhd.