Skip to content

HiDPI support in CCLabelTTF - #3294

Merged
pandamicro merged 1 commit into
cocos2d:developfrom
ntrrgc:hidpi-text
Jun 14, 2016
Merged

pandamicro merged 1 commit into
cocos2d:developfrom
ntrrgc:hidpi-text

Conversation

@ntrrgc

@ntrrgc ntrrgc commented Jun 3, 2016

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

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

1scaR1 commented Jun 14, 2016

Copy link
Copy Markdown
Contributor

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

@ntrrgc

ntrrgc commented Jun 14, 2016

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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

ntrrgc commented Jun 14, 2016

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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