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

refine font setting #5627

Merged
merged 1 commit into from Nov 1, 2019
Merged

Conversation

@umbrellaPP
Copy link
Contributor

umbrellaPP commented Oct 27, 2019

Re: cocos-creator/2d-tasks#1699

之前的 pr #5490 重新提交

changeLog:

  • 优化编辑器下 Label 和 RichText 设置字体的操作体验
  • 修复使用系统字体时,Font Family 为空导致的渲染问题

test

PP
if (this.useSystemFont && !this.fontFamily) {
this.fontFamily = 'Arial';
}

This comment has been minimized.

Copy link
@umbrellaPP

umbrellaPP Oct 27, 2019

Author Contributor

这段 hack 逻辑应该不需要了,assembler 里默认会使用 Arial

@umbrellaPP umbrellaPP requested a review from caryliu1999 Oct 27, 2019
@@ -425,10 +424,6 @@ let Label = cc.Class({
this._lazyUpdateRenderData();
this._checkStringEmpty();
}
else if (!this._userDefinedFont) {
this.disableRender();

This comment has been minimized.

Copy link
@umbrellaPP

umbrellaPP Oct 27, 2019

Author Contributor

默认使用 Arial 字体渲染,应该不需要禁用渲染才对

This comment has been minimized.

Copy link
@caryliu1999

caryliu1999 Oct 28, 2019

Contributor

默认使用 Arial 字体渲染,应该不需要禁用渲染才对

这里有没有切换到CHAR模式下测试看有没有问题?

This comment has been minimized.

Copy link
@umbrellaPP

umbrellaPP Oct 28, 2019

Author Contributor

char 模式测试没问题 @caryliu1999

@umbrellaPP

This comment has been minimized.

Copy link
Contributor Author

umbrellaPP commented Oct 29, 2019

在微信 和模拟器上验证没问题

@holycanvas

This comment has been minimized.

Copy link
Contributor

holycanvas commented Nov 1, 2019

原生上测试没问题

@holycanvas holycanvas merged commit d48b26b into cocos-creator:v2.2.1-release Nov 1, 2019
1 check passed
1 check passed
ci/circleci: test Your tests passed on CircleCI!
Details
@umbrellaPP umbrellaPP deleted the umbrellaPP:221_font branch Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.