Cocos2d low quality text 3.17

Cocos2d low quality text 3.17
0

#1

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.

Using:
Windows 8.1
Cocos2d-x 3.17

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


#2

Can you share your code?


#3

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.


#4

Use Label::createWithTTF and not scale the text.


#5

It is still blurry


#6

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


#7

Yes, exactly.


#8

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


#9

Thanks. Let’s check this out.


#10

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!


#11

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


#12

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.