CSS - Why do Chinese websites use English font-family
Asked Answered
C

1

11

I have worked on a couple of multi lingual website with both an English and Chinese version. I would always specify a Chinese CSS font-family for the Chinese version, and an English one for the English version. Makes sense right?

Example:

Chinese:

html body.chinese {
   font-family: '宋体',宋体b8b体,Microsoft YaHei, Arial, sans-serif
}

English:

html body {
   font-family: Arial,Helvetica,"Nimbus Sans L",sans-serif;
}

Then I noticed that my font didn't always display correctly in Chinese depending on the OS/browser, so I went to take a look at how some famous Chinese websites do it...

What I found out is that they don't specify Chinese font-families, but just English ones like Arial.

Take a look at baidu.com:

body {
   font: 12px arial;
}

Weibo.com:

body, button, input, select, textarea {
   font: 12px/1.125 Arial,Helvetica,sans-serif;
   _font-family: "SimSun";
}

1) Does anyone know why baidu does not specify a common Chinese font like SongTi?

2) And why does weibo to the same, but they add '_font-famly: "SimSun"' underneath their font declaration with a prepended underscore?

FYI: I used both English and Chinese computers/browsers to check and I'm located in China. It always displays like this.

Cellulitis answered 21/5, 2014 at 7:29 Comment(3)
css properties with _ prefix is an old hack for old ie+windows versions. My guess from weibo's usage is that arial and helvetica probably has some fallback typefaces with chinese characters in modern operating systems and/or browsers. Old windows or ie versions may not have this fallback hence the underscore hack.Syringomyelia
This question appears to be off-topic because it is about speculating on the reasons for coding decisions.Matamoros
The reason why not specifying Chinese font is because the browser would fallback to default Chinese typeface like Heiti SC/TC or Songti SC/TC. Due to the big size of Chinese font, if you need Chinese typeface support, head to web font company like justfont.com or youziku.com. They offer a different typeface support compared to Google Font API.Dogcart
C
12

I found a good guide about Chinese font-family definitions for CSS here: http://www.kendraschaefer.com/2012/06/chinese-standard-web-fonts-the-ultimate-guide-to-css-font-family-declarations-for-web-design-in-simplified-chinese/

Basically most websites just declare an English font and let the browser fallback to the default Chinese font for either serif (usually '宋体' aka SimSun) or sans-serif (usually SimHei).

Cellulitis answered 7/8, 2014 at 6:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.