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 misusage of SelectObject and DeleteObject #1766

Merged
merged 3 commits into from Jul 5, 2019

Conversation

@minggo
Copy link
Contributor

@minggo minggo commented Jul 4, 2019

修复 windows 文本大小变化的问题。之前的代码误用了 SelectObject()DeleteObject(),同时稍微重构了一下代码,删除不必要的代码。

// Since the web platform cannot get the baseline of the font, an additive offset is performed for all platforms.
// That's why we should add baseline back again on other platforms
GetTextMetrics(_DC, &_tm);
point.y -= _tm.tmAscent;
Copy link
Member

@jareguo jareguo Jul 4, 2019

Choose a reason for hiding this comment

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

这里似乎撤销了 knox 前段时间的改动,需要 @knoxHuang 确认下

Loading

Copy link
Contributor Author

@minggo minggo Jul 5, 2019

Choose a reason for hiding this comment

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

这块逻辑还原了。

Loading

@jareguo jareguo merged commit 4e19492 into cocos-creator:v2.1.2 Jul 5, 2019
1 check passed
Loading
@minggo minggo deleted the label-issue-windows branch Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants