Skip to content
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

Fix the problem of label cropping on the runtime platform. #6441

Merged
merged 1 commit into from Mar 31, 2020

Conversation

caryliu1999
Copy link
Contributor

@caryliu1999 caryliu1999 commented Mar 27, 2020

Re: https://github.com/cocos-creator/2d-tasks/issues/2079, https://github.com/cocos-creator/2d-tasks/issues/1679

Changes:

runtime 平台的底层差异,baseline 的实现不同,绘制文本的时候增加了留白空间,但是 baseline 需要依据留白进行调整。

oppo手机快应用平台显示效果:

image

编辑器中的效果:

image

@holycanvas holycanvas requested a review from jareguo Mar 30, 2020
if (CC_RUNTIME) {
_BASELINE_RATIO = -0.05;
_BASELINE_OFFSET = _BASELINE_RATIO / 2;
Copy link
Contributor

@holycanvas holycanvas Mar 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个算法能满足多个runtime平台么

@holycanvas
Copy link
Contributor

@holycanvas holycanvas commented Mar 30, 2020

@yongminghuang 麻烦勇明确认下其他runtime平台会不会有问题

@yongminghuang
Copy link
Contributor

@yongminghuang yongminghuang commented Mar 31, 2020

@yongminghuang 麻烦勇明确认下其他runtime平台会不会有问题

测试了 vivo ,华为,cocos-play ,趣头条 是正常的

@holycanvas holycanvas merged commit d617243 into cocos:v2.3.3-release Mar 31, 2020
1 check passed
@caryliu1999 caryliu1999 deleted the v2.3.3-release-runtime branch Jun 22, 2021
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.

None yet

3 participants