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.

3
  • 1
    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.
    – Quad
    Commented May 21, 2014 at 7:37
  • This question appears to be off-topic because it is about speculating on the reasons for coding decisions. Commented May 21, 2014 at 8:06
  • 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.
    – p3nchan
    Commented Sep 5, 2015 at 4:45

1 Answer 1

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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.