cocos2d-x Design Size feature and blurry CCLabelTTF

1.7k views Asked by At

I had a project with CCLabelTTF looking sharp and good. When I started to use the design size feature to fix some issues appeared with different device sizes, and retina displays, all fonts started to look blurry.

I saw an answer in the following link but it is complicated and I did not understand how to implement. http://www.cocos2d-x.org/forums/6/topics/32206?r=42107

Of course I can revert from using the design size feature, but I would prefer to use a workaround if there is one.

Thanks for advance.

1

There are 1 answers

1
Gavin Thornton On

I added a workaround at the page you linked to, repeating it here:

A simple hack, create your label with the font at x4 size (or more/less if you want) and then scale the label to 0.25 (divide by 4) to get it back to its normal size. See my screenshot for the before and after results.

myLabel = CCLabelTTF::create("Play", "Helvetica", 20*4, CCSizeMake(0, 0), kCCTextAlignmentCenter);
myLabel->setScale(0.25);

Before and after fonts on buttons in Arrow Mania