Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#39379 closed defect (bug) (fixed)

Twenty Seventeen: Error font-family for Simplified Chinese (zh_CN) in CSS

Reported by: ze3kr's profile ze3kr Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.8 Priority: normal
Severity: normal Version: 4.7
Component: Bundled Theme Keywords: good-first-bug has-patch
Focuses: Cc:

Description (last modified by davidakennedy)

In the style.css of the new theme twentyseventeen (both stable and nightly build), line 664, which defines Chinese font:

/* Typography for Chinese Font */

html[lang^="zh-"] body,
html[lang^="zh-"] button,
html[lang^="zh-"] input,
html[lang^="zh-"] select,
html[lang^="zh-"] textarea {
	font-family: "PingFang TC", "Helvetica Neue", Helvetica, STHeitiTC-Light, Arial, sans-serif;
}

However, this CSS is only suitable for zh-HK and zh-TW, but not for zh-CN, which should not use traditional Chinese (TC), but Simplified Chinese (SC)

So it needs to add these line after that, and it works well:

html[lang="zh-CN"] body,
html[lang="zh-CN"] button,
html[lang="zh-CN"] input,
html[lang="zh-CN"] select,
html[lang="zh-CN"] textarea {
    font-family: "PingFang SC", "Helvetica Neue", Helvetica, STHeitiSC-Light, Arial, sans-serif
}

See: https://wordpress.org/support/topic/error-font-family-for-simplified-chinese-zh_cn-in-twentyseventeens-css-2/

Attachments (1)

39379.patch (595 bytes) - added by Dharm1025 8 years ago.
Patch

Download all attachments as: .zip

Change History (11)

#1 @Presskopp
8 years ago

  • Component changed from General to Bundled Theme
  • Summary changed from Error font-family for Simplified Chinese (zh_CN) in twentyseventeen’s CSS to Twenty Seventeen: Error font-family for Simplified Chinese (zh_CN) in CSS

#2 @davidakennedy
8 years ago

  • Description modified (diff)

#3 @davidakennedy
8 years ago

Hey @ze3kr! Thanks for the bug report, and welcome to Trac!

Can you explain in more detail what's not working? So the CSS should be applied to zh-CN but isn't unless you specify it specifically?

#4 @swissspidy
8 years ago

@davidakennedy Note the different CSS. zh-CN should use "PingFang SC" and STHeitiSC-Light, but all other zh- should use "PingFang TC" and STHeitiTC-Light (TC vs SC).

#5 follow-up: @davidakennedy
8 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

@swissspidy Ah, thank you for the clarification! I missed that when I read the CSS three times before. :)

This makes sense to me to change if it makes the theme better on language variations. I do want to get input from @melchoyce and have her eyes on this. Want to tweak and test this?

#6 in reply to: ↑ 5 @melchoyce
8 years ago

Replying to davidakennedy:

@swissspidy Ah, thank you for the clarification! I missed that when I read the CSS three times before. :)

This makes sense to me to change if it makes the theme better on language variations. I do want to get input from @melchoyce and have her eyes on this. Want to tweak and test this?

Yup, this needs to be fixed 👍

#7 @SergeyBiryukov
8 years ago

  • Keywords good-first-bug added

@Dharm1025
8 years ago

Patch

#8 @Dharm1025
8 years ago

  • Keywords has-patch added; needs-patch removed

#9 @SergeyBiryukov
8 years ago

  • Milestone changed from Future Release to 4.8

#10 @SergeyBiryukov
8 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 39942:

Twenty Seventeen: Improve typography for Simplified Chinese (zh_CN).

Props ze3kr, Dharm1025.
Fixes #39379.

Note: See TracTickets for help on using tickets.