Opened 6 years ago
Closed 6 years ago
#45408 closed defect (bug) (fixed)
Twenty Seventeen: Error font-family style for Simplified Chinese (zh_CN).
Reported by: | ze3kr | Owned by: | laurelfulford |
---|---|---|---|
Milestone: | 5.0.2 | Priority: | normal |
Severity: | normal | Version: | 5.0 |
Component: | Bundled Theme | Keywords: | commit has-patch fixed-5.0 |
Focuses: | Cc: |
Description
In wordpress 5.0 (5.0-RC1-43944):
/wp-content/themes/twentyseventeen/assets/css/editor-blocks.css (For the new block editor)
Line 160:
/* Typography for Chinese Font */ html[lang^="zh-"] .edit-post-visual-editor .editor-block-list__block, html[lang="zh-CN"] .edit-post-visual-editor .editor-block-list__block { font-family: "PingFang TC", "Helvetica Neue", Helvetica, STHeitiTC-Light, Arial, sans-serif; }
zh-CN should use SC, but not TC. Or the type of character is not correct. Similar to: #39379
Should be changed to:
/* Typography for Chinese Font */ html[lang^="zh-"] .edit-post-visual-editor .editor-block-list__block { font-family: "PingFang TC", "Helvetica Neue", Helvetica, STHeitiTC-Light, Arial, sans-serif; } html[lang="zh-CN"] .edit-post-visual-editor .editor-block-list__block { font-family: "PingFang SC", "Helvetica Neue", Helvetica, STHeitiSC-Light, Arial, sans-serif; }
Attachments (3)
Change History (16)
#2
@
6 years ago
- Component changed from Themes to Bundled Theme
Hi @ze3kr, Welcome to WordPress Trac! Thank you for your ticket.
As per your ticket if above Chinese(zh_CN) font issue is in Twenty Seventeen theme editor-blocks.css then theme is also use STHeitiTC-Light
font family so needs to fix that also.
To contribute with patch refer this article - https://make.wordpress.org/core/handbook/contribute/git/#patches
#3
@
6 years ago
Hi, I think the patch is incorrect (for both 2 files). And the original wp-content/themes/twentyseventeen/style.css is fine.
#4
@
6 years ago
For Chinese other than Simplified Chinese, it should use TC:
font-family: "PingFang TC", "Helvetica Neue", Helvetica, STHeitiTC-Light, Arial, sans-serif;
For Simplified Chinese, it should use SC.
font-family: "PingFang SC", "Helvetica Neue", Helvetica, STHeitiSC-Light, Arial, sans-serif;
Note that there are 2 fonts need to specify SC and TC, PingFang and STHeiti.
So the style.css is fine(fixed in #39379 ), but not the editor-blocks.css.
#6
@
6 years ago
- Keywords has-patch needs-refresh added
- Milestone changed from Awaiting Review to 5.0
- Owner set to laurelfulford
- Status changed from new to reviewing
- Summary changed from Again, error font-family style for Simplified Chinese (zh_CN). to Twenty Seventeen: Error font-family style for Simplified Chinese (zh_CN).
#8
@
6 years ago
- Keywords commit added; has-patch removed
- Status changed from reviewing to accepted
Thank you, @ze3kr, for the report and review, and @vaishalipanchal for the patch!
I can confirm that this patch makes these styles in editor-blocks.css line up with what is used in style.css: [lang^="zh-"]
now uses PingFang TC
and STHeitiTC-Light
, and [lang="zh-CN"]
now uses PingFang SC
and STHeitiSC-Light
.
I have also checked 2019 theme, and it does NOT have the same problem. It has set the font family for zh-CN correctly.