Cocos2d low quality text 3.17

Cocos2d low quality text 3.17


Posted this question a while ago for version 3.16, but it’s still on 3.17.

The text has very low quality.

Some people say it’s because OpenGL resizes the text, I don’t know how to fix that. Some people say it’s because the text is not position perfectly on one pixel, implying that the position is an not an integer.

The last time I posted this, someone said to set window.devicePixelRatio, I don’t even know how to do that, or what that is.

Windows 8.1
Cocos2d-x 3.17

I did not set the design size, I left AppDelegate.cpp exactly how it is.


Can you share your code?


I shouldn’t need to. It also happens in the default HelloWorldScene.cpp file, I do nothing but create a cocos2d::ui::Text object, set the position to Director::getInstance ()->visibleSize/2and call addChild on the text object.
But again, it happens in the default scene.


Use Label::createWithTTF and not scale the text.


It is still blurry


Are you saying this happens when you create a project with cocos new and then run that project with zero changes to it?


Yes, exactly.


When the font is really big, it doesn’t look that bad, but when I try to display numbers at around 24pts, it looks noticeably blurry


Thanks. Let’s check this out.


Just want to add for detail, this is the default arial font at 30pts

Don’t know if the picture shows it well, but it’s not sharp at all

But at 50pts, it looks pretty good!


I’ve noticed that below 40pts is when it starts getting more blurry


Thanks I’ll setup a clean windows env today/tomorrow and test this out along with our install instructions to make sure they are still current.