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 typesetting problem of letter font. #4007

Merged

Conversation

Projects
None yet
3 participants
@caryliu1999
Copy link
Contributor

commented Mar 11, 2019

No description provided.

@@ -446,7 +446,7 @@ module.exports = {
out = labelInfo.out.toHEX("#rrggbb");
};

return hashData + labelInfo.fontSize + labelInfo.fontFamily + color + out;
return hashData + labelInfo.fontSize + labelInfo.fontFamily + labelInfo.lineHeight + color + out;

This comment has been minimized.

Copy link
@pandamicro

pandamicro Mar 11, 2019

Member

按理说 lineheight 不同是可以做到不影响贴图的使用的,这个能做到剥离吗?比如在缓存的时候固定使用 font size 来确定贴图尺寸,渲染的时候用 lineHeight 来动态计算 offsetY

This comment has been minimized.

Copy link
@caryliu1999

caryliu1999 Mar 12, 2019

Author Contributor

已修改

@pandamicro pandamicro merged commit b9caa27 into cocos-creator:v2.0-release Mar 12, 2019

1 check passed

ci/circleci: test Your tests passed on CircleCI!
Details

caryliu1999 added a commit to caryliu1999/engine that referenced this pull request Mar 12, 2019

fix the typesetting problem of letter font. (cocos-creator#4007)
* fix the typesetting problem of letter font.

* remove calculated lineheight

@caryliu1999 caryliu1999 deleted the caryliu1999:v2.0-release-fix-char branch Apr 15, 2019

@jareguo

This comment has been minimized.

Copy link
Contributor

commented May 9, 2019

修复 Label 启用 CHAR mode 时文字定位可能错乱的问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.