简体   繁体   English

CSS - 为什么中文网站使用英文字体

[英]CSS - Why do Chinese websites use English font-family

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. 我总是为中文版指定一个中文CSS字体系列,为英文版指定英文版。 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. 我发现他们没有指定中文字体系列,而只是英文字体系列,如Arial。

Take a look at baidu.com: 看看baidu.com:

body {
   font: 12px arial;
}

Weibo.com: 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? 1)有没有人知道为什么baidu没有指定像SongTi这样的常用中文字体?

2) And why does weibo to the same, but they add '_font-famly: "SimSun"' underneath their font declaration with a prepended underscore? 2)为什么微博也一样,但是他们在字体声明下添加了'_font-famly:“SimSun”,带有前置下划线?

FYI: I used both English and Chinese computers/browsers to check and I'm located in China. 仅供参考:我使用英文和中文电脑/浏览器进行检查,我位于中国。 It always displays like this. 它总是这样显示。

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/ 我在这里找到了关于CSS的中文字体系列定义的好指南: http//www.kendraschaefer.com/2012/06/chinese-standard-web-fonts-the-ultimate-guide-to-css-font-family -declarations换网络的设计中,简化-中国/

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). 基本上大多数网站只声明一个英文字体,让浏览器回退到serif(通常是'宋体'又名SimSun)或sans-serif(通常是SimHei)的默认中文字体。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM