Skip to content

HiDPI support in CCLabelTTF #3294

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 14, 2016
Merged

HiDPI support in CCLabelTTF #3294

merged 1 commit into from
Jun 14, 2016

Conversation

ntrrgc
Copy link
Contributor

@ntrrgc ntrrgc commented Jun 3, 2016

This patch adds built-in HiDPI support to text labels, so you don't have to double font size and scale them down manually in order to have crisp text rendering in high resolution mobile devices.

@pandamicro
Copy link
Contributor

@ntrrgc Thanks for the contribution, it's a very intelligent solution ~

@pandamicro pandamicro merged commit 38c8ec5 into cocos2d:develop Jun 14, 2016
@1scaR1
Copy link
Contributor

1scaR1 commented Jun 14, 2016

Mmm now labels returns incorrect contentSize of them.(On retina(MacBook or iPad) twice more then they are)

@ntrrgc
Copy link
Contributor Author

ntrrgc commented Jun 14, 2016

Yep, I was worried of this kind of issues. Fixing that one would be a matter of overriding one more method.

On the other hand, I haven't checked affine transformations other than scaling (how many does cocos2D support?). Depending on how they are implemented, labels using them may break too, case in which we may have to come with another solution.

@pandamicro
Copy link
Contributor

@1scaR1 nice catch, I'll fix that

@ntrrgc I think we should find a way to isolate the texture size with the transform

@ntrrgc
Copy link
Contributor Author

ntrrgc commented Jun 14, 2016

Ideally the size of the texture and the unscaled logical size of the sprite should be allowed to be different to support different image depths.

@pandamicro
Copy link
Contributor

@1scaR1 Issue fixed in new PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants