中文标准web字体

摘要:
标准的简体中文web字体:WindowsOSX黑体:SimHei冬青黑体:HiraginoSansGB[NEWFORSNOWLEOPARD]宋体:SimSun华文细黑:STHeitiLight[STXihei]新宋体:NSimSun华文黑体:STHeiti仿宋:FangSong华文楷体:STKaiti楷体:KaiTi华文宋体:STSong仿宋_GB2312:FangSong_GB2312华文仿宋:STFangsong楷体_GB2312:KaiTi_GB2312微软雅黑体:MicrosoftYaHei[asofWin7]在css中使用中文字体地良好习惯:同时使用中文字体的中文名和英文名当声明一个中文字体的时候,同时声明中文字体的拉丁文名字和中文名字。我需要用引号来引中文字体么?

标准的简体中文web字体:

WindowsOS X
黑体:SimHei冬青黑体: Hiragino Sans GB [NEW FOR SNOW LEOPARD]
宋体:SimSun华文细黑:STHeiti Light [STXihei]
新宋体:NSimSun华文黑体:STHeiti
仿宋:FangSong华文楷体:STKaiti
楷体:KaiTi华文宋体:STSong
仿宋_GB2312:FangSong_GB2312华文仿宋:STFangsong
楷体_GB2312:KaiTi_GB2312
微软雅黑体:Microsoft YaHei [as of Win7]

在css中使用中文字体地良好习惯:

同时使用中文字体的中文名和英文名

当声明一个中文字体的时候,同时声明中文字体的拉丁文名字和中文名字。

这样做的好处是不管你的中文字体是是以拉丁文名还是中文名存储的,你都可以使用中文字体。

font-family: Tahoma, Helvetica, Arial, "Microsoft Yahei","微软雅黑", STXihei, "华文细黑", sans-serif;

英文字体的声明放在中文字体声明之前

这不是官方的规则,只是我得个人偏好,为什么我要这样做呢?因为英文字形总是不包括中文字体,但是中文字体却包含a-Z单词,所以,如果你先声明中文字体的话,后面声明的英文字体就不会被执行。

所以,如果你先声明英文字体的话,对于英文字母会先执行英文字体,对于不能解析的中文字才会尝试着使用回退字体(也就是英文字体后面声明的字体)。

例如下面:

中文标准web字体第1张

代码示例:

font-family: Georgia, "Times New Roman", "Microsoft YaHei", "微软雅黑", STXihei, "华文细黑", serif;

声明 MICROSOFT字体以及MAC 字体

就像英语字体一样,你至少要声明适用于windows的字体和适用Mac的中文字体。至于哪个应该先声明,你要看你针对的平台是什么。

我需要用引号来引中文字体么?

你不需要如下的做法:

font-family: Georgia, "Times New Roman", "Microsoft YaHei", "微软雅黑", STXihei, "华文细黑", serif;

你应该这样做:

font-family: Georgia, "Times New Roman", "Microsoft YaHei", 微软雅黑, STXihei, 华文细黑, serif;

主要的中文字体

宋体12号 – SIMSUN 12PT FONT

font-family: Arial, Helvetica, tahoma, verdana, 宋体, SimSun, 华文细黑, STXihei, sans-serif;

微软雅黑 – MICROSOFT YAHEI

font-family: Tahoma, Arial, Helvetica, "Microsoft YaHei New", "Microsoft Yahei", "微软雅黑", 宋体, SimSun, STXihei, "华文细黑", sans-serif;

仿宋 – FANGSONG

font-family: Georgia, "Times New Roman", "FangSong", "仿宋", STFangSong, "华文仿宋", serif;

楷体 – KAITI

font-family: Georgia, "Times New Roman", "KaiTi", "楷体", STKaiti, "华文楷体", serif;

处理中文的@FONT-FACE?

考虑到很多的中文字体文件很大,并且包含至少3000个基本的字形,所以中文对于@font-face支持度不是很好。

我许多的非标准中文字大于5MB,Considering that most Chinese font files are kinda ginormous and typically include at least 3000 base glyphs, Chinese doesn’t lend itself very well to @font-face embedding. Many of my non-standard Chinese fonts run upwards of 5MB, and the @font-face generator over at Font Squirrel has a 2MB file size limit. So, while it’s impractical on a CMS platform where you’re dealing with a bunch of user-generated data, that’s not to say it can’t be done.

You can use theCodeAndMorefontface generator to skip over Font Squrrel’s file size limit if you’re so inclined.

TYPEKIT-STYLE SYSTEMS FOR CHINESE FONTS

[November 15, 2013 UPDATE:] There is another way. I just found out about a company calledJustFontbased out of Taiwan that offers a Typekit-style font hosting for Chinese @font-face style fonts. They’ve got a decent library of font options, both for simplified and traditional Chinese characters (less for Simplified characters, but that may change in time). Problem: they don’t have an English-language interface, so if you can’t work in Chinese, you’ll have a problem using the site. They do, however, offer Facebook sign-up, so you’ll be able to get that far at least.

[Sept 5, 2014 UPDATE:] Aaaand another one:Youziku.com. This one is awesome – they have a much bigger font library than JustFont. My shop has tested these guys out, and for the most part, everything works well. They offerthree embedding methodsfor their fonts, but only the webservice scriptreally gives you similar usage freedom to @font-faceTwo issues that I’ve found: extra-thin fonts displayed at small sizes come out looking super ragged to the point of being unusable. And two, if you use their hosted service, there’s a little jump on page load – the page loads the content first then applies the font to it, so you see unstyled characters for a split second before the font settles into place.

WHAT’S UP WITH THE NEW FREE FONT, SOURCE HAN SANS?

So, Adobe, who put out Source Sans (English) font a few years ago, teamed up with Google in summer 2014 to releaseSource Han Sans,the best thing to happen to Chinese web fonts basically ever. Though these fonts are not yet available as hosted fonts on English servers (desktop version only on Typekitand Google as of Dec 2014), the font is hosted on Youziku.com, under its Chinese font name,思源黑体. Best thing about this is that unlike most Chinese fonts, this one comes in 7 weights all the way from Extralight to Heavy – yeah, baby. I hope to see this on Google / Typekit as a hosted option soon.

AND WHAT ABOUT NOTO SANS HANS?

Google is currently (Dec. 2014) working on a free font called “Noto Sans” (here’s theproject page), which aims to support all the world’s languages. There are Chinese versions available for download, but these are not hosted on Google webfonts yet. The font’s lovely, though – you should get it. Google does offer an “Early Access Webfonts” page, where you can snag embedding code for experimental fonts. There are a couple of Traditional Chinese fonts there, but no Simplified fonts yet. A few versions of Noto Sansalso support Pinyin.

WHAT’S THE DEAL WITH GOOGLE FONTS AND CHINA?

Mainland Chineseinternet usersare no longer able to connect to the Google Font API since the government blocked access to Google. Having a Google webfont on your Chinese website basically hangs the loading process for ages for users based in China as the site tries to render the font. Sometimes it works, mostly it fails. No one ever said life was fair.

[December 12, 2014 UPDATE:] So, Qihoo 360 is hosting a Google webfont mirror for Chinese users. If your site is only targeting China, you can use the Qihoo 360 mirror to load Google webfonts. If your site is targeting both China-based and non-China-based users, the recommendation is to load a script that decides which webfont source to use based on the user’s IP.Get the details on SEO Shifu.

NEED A CUSTOM CHINESE FONT OR LOGOTYPE MADE?

Makefont.com: These guys are hot-shit design-y Chinese typographers. And buy their ready-made fonts, they’re really cool.

WHAT’S THE DIFFERENCE BETWEEN BIG5 AND GB2312 CHINESE FONTS?

Quick history lesson: About 50 years ago, Chairman Mao controlled mainland China. And he decided that literacy rates were super low because Chinese characters were crazy complicated to write. So he decided to “Simplify” the whole written language. He hired some linguists, they came up with a writing system that removed a ton of the strokes from many of the characters, reducing the complexity of written Chinese.

Problem: Mao’s little plan only effected the people in Mainland China. That means that all the Chinese people living outside of Mao’s sphere of influence – people in Taiwan and Hong Kong, and Chinese immigrants to the U.S. and abroad – didn’t adopt the new system at all. So now, Chinese characters can be written two ways. One way is the old way, “traditional characters”. Or, as we call it in fonts on the web, Big5. The other way is the new way, used only in China proper, “simplified characters”, or GB2312.

If you are choosing fonts for a site that targets mainland China, choose GB2312. If you are targeting Hong Kong, China towns abroad and immigrant communities, Taiwan, etc., use Big5. Most Chinese websites offer both on multi-lingual platforms. The fonts on this page are all GB2312, but most have Big5 versions.

(Dear type-A devs: yup, I know. I know what an encoding is. It’s just easier to explain this way, kthxbye.)

免责声明:文章转载自《中文标准web字体》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇多行字符串换行符(`) + 模板字符串从数据库中取时间值,报错:java.sql.Timestamp cannot be cast to java.lang.Long下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

17,css--文本属性和字体属性

文本属性 介绍几个常用的。 文本对齐 text-align 属性规定元素中的文本的水平对齐方式。 属性值:none | center | left | right | justify 文本颜色 color属性 文本首行缩进 text-indent 属性规定元素首行缩进的距离,单位建议使用em 文本修饰 text-decoration属性规定文本修饰的样式...

如何使用asp.net导出PDF文件

PDF简介:PDF(Portable Document Format)文件格式是Adobe公司开发的电子文件格式。这种文件格式与操作系统平台无关,也就是说,PDF文件不管是在Windows,Unix还是在苹果公司的Mac OS操作系统中都是通用的。这一特点使它成为在Internet上进行电子文档发行和数字化信息传播的理想文档格式。越来越多的电子图书、产品说...

CSS文本部分之字体样式[1]

1. 字体系列 [通用字体系列] 1. serif字体:带衬线字体,如Georiga、Times等 2. sans-serif字体:不带衬线字体,包括Arial、Geneva等 3. Monospace字体:等宽字体,包括Courier等 4. Cursive字体:手写字体,包括Author等 5. Fanstasy字体:无法归类,包括Western等...

ios -富文本和尺寸

/** *计算文本的宽高 方法 2 * *@param str 需要计算的文本 *@param font文本显示的字体 *@param maxSize 文本显示的范围 * *@return 文本占用的真实宽高 */ + (CGSize)sizeMethod2WithString:(NSString *)str font:(UIFont *)font max...

html颜色代码对照表

<style type="text/css"><!--.menuskin {}{    BORDER: #666666 1px solid; VISIBILITY: hidden; FONT: 12px Verdana;width:90px;    POSITION: absolute;     BACKGROUND-COLOR:#EF...

移动端利用rem实现自适应布局

  好久没有写博客了,刚好说说最近遇到的移动端布局问题吧。   本来一直是觉得我的页面布局能力还是不错的,当然,是相对于较基础的来说还是不错的。不过,自己写的案例终归是跟实际开发有区别的,自己写案例的是觉得这个样式有时候并没有那个完美就放弃那个效果了。到后来 ,发现这是一个很不好的习惯,一直想着小毛病不去解决,想着以后总归是会的。结果在实际开发的时候,发现...