Question about bitmap font in retina mode

When I enable the Retina mode, the CCLabelBMFont cannot show correctly.
It seems to result from the inconsistency between points and pixels and thus the texture gets skewed.
Is there any solution to this problem?
Many thanks!

Can you post any code snippets or screenshots, help me to find the bug?
Ater all, the unit test looks well.

I create a “cocos2d-x Aplication” template project with Xcode on iMac.

changed code:

bool HelloWorld::init()
{
    ...

    // create and initialize a label
    //CCLabelTTF* pLabel = CCLabelTTF::labelWithString("HelloWorld", "Thonburi", 34);
    CCLabelBMFont* pLabel = CCLabelBMFont::labelWithString("01234", "num.fnt");

    ...
}

and switch the normal / retina mode:

- (void) applicationDidFinishLaunching:(UIApplication*)application
{
    ...

    // Enables High Res mode (Retina Display) on iPhone 4 and maintains low res on all other devices
    //if (! cocos2d::CCDirector::sharedDirector()->enableRetinaDisplay(true))
    //  CCLOG("Retina Display Not supported");

    ...
}

or

- (void) applicationDidFinishLaunching:(UIApplication*)application
{
    ...

    // Enables High Res mode (Retina Display) on iPhone 4 and maintains low res on all other devices
    if (! cocos2d::CCDirector::sharedDirector()->enableRetinaDisplay(true))
        CCLOG("Retina Display Not supported");

    ...
}

Except for the above changes, there’s no any other change to the template project.

Thanks again!

Well,I have take a look at the screenshots.
I think it’s because of you don’t provide the resource file with suffix “~~hd".
So you got the wrong effect.
If you want to get the 2x effect,you must scale the .fnt file and the .png file it’s used at first.
Then rename them with suffix "~~hd”.

Hope it will help you!

Bin Zhang wrote:

Well,I have take a look at the screenshots.
I think it’s because of you don’t provide the resource file with suffix “~~hd".
>
So you got the wrong effect.
>
If you want to get the 2x effect,you must scale the .fnt file and the .png file it’s used at first.
Then rename them with suffix "~~hd”.
>
Hope it will help you!

Thanks for your answer, now I see.
I tried to do as your instruction and now it works

Does that mean I should use 480 x 320 points position all the time?
But the point position in retina mode will map to 4x pixcels automatically,
so should I just provide the 4x larger image file?

No matter enable retina display or not the dimesion of screen in points are 320x480 always on ios.
when the retina display is disable, the full screen picture’s dimesion in pixels are 320x480.
But when enable retina display, the full screen picture’s dimesion in pixels are 640x960, in other words, the picture which size is 320x480 pixels cover the 1/4 dimension of the screen.