3

I received couple of screenshots from a user indicating that the CCMenuItemFont and CCLabelTTF do not appear on a Macbook retina device. All the images in the application are correctly shown while the text doesn't appear correctly.

A code sample of one of the labels:

    CCLabelTTF *label=[CCLabelTTF labelWithString:answer fontName:@"Helvetica" fontSize:30];
    [label setColor:ccc3(255, 255, 255)];
    [label setPosition:ANSWER_POSITION];
    [self addChild:label];

I am using two languages in the application. The english words appear as a small wave while the others don't appear at all. A screenshot to show an english word: Incorrectly displayed label

Unfortunately, I don't have access to a Retina device, and the following method is not working for me to debug the problem: How to simulate a retina display (HiDPI mode) in Mac OS X 10.8 Mountain Lion on a non-retina display?

Any ideas how to solve this problem? Thanks in advance

4

1 回答 1

4

问题出在我使用的 cocos2d 版本(2.0V)中。使用 2.1 或应用此链接中提到的解决方案: 解决方案

对两种语言都有效的解决方案是在 CCTexture2D 中添加以下行:

[[NSAffineTransform transform] set];
于 2013-01-06T18:00:37.007 回答