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

HiDPI support in CCLabelTTF #3294

Merged
merged 1 commit into from Jun 14, 2016

Conversation

Projects
None yet
3 participants
@ntrrgc
Contributor

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

This comment has been minimized.

Member

pandamicro commented Jun 14, 2016

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

@pandamicro pandamicro merged commit 38c8ec5 into cocos2d:develop Jun 14, 2016

@1scaR1

This comment has been minimized.

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

This comment has been minimized.

Contributor

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

This comment has been minimized.

Member

pandamicro commented Jun 14, 2016

@1scaR1 nice catch, I'll fix that

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

@ntrrgc

This comment has been minimized.

Contributor

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

This comment has been minimized.

Member

pandamicro commented Jun 24, 2016

@1scaR1 Issue fixed in new PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment