Css font-family Chinese font, cssfont-family

Source: Internet
Author: User

Css font-family Chinese font, cssfont-family

Speaking of font-family in css, I believe many friends often use it, but I don't know how to write it when you reference Chinese fonts?
Recently, I have paid special attention to the following three types of most commonly used:

  • 1. Direct Chinese;
  • 2. English format;
  • 3. unicode code;

The preceding two forms are well understood. What does unicode code mean? The basic definition is as follows:

Unicode (unified code, universal code, Single Code) is a character encoding used on a computer. It sets a unified and unique binary code for each character in each language to meet the requirements of cross-language and cross-platform text conversion and processing.

For more information, see Baidu encyclopedia's introduction to Unicode.
After the solution is introduced, let's talk about it again. Previously, I read an article written by YU Bo, "Writing Chinese fonts in CSS", which mentioned: the in font-family, "represented in unicode, no SimSun, some Firefox versions and Opera do not support SimSun writing ". I searched for related content on the Internet, most of which were excerpted from this article. I did not mention which Firefox and Opera versions do not support English writing.
In comparison, the three methods have their own advantages and disadvantages: The Chinese form is easy to remember, but it cannot be displayed normally in a system that does not support Chinese characters or a page that supports encoding; the English format is compatible with the system and encoding problems, but it is difficult to remember and may have potential risks. unicode Code has the best compatibility, but there are also problems with hard memory.
In terms of comprehensive trade-offs, performance and security are still recommended.Unicode code. If it is not too strict, you can select the other two types.


Below we will sort out different display forms of commonly used fonts for ease of use: Chinese name English name Unicode

Windows
*SimSun \ 5B8B \ 4F53
*SimHei \ 9ED1 \ 4F53
*Microsoft YaHei \ 5FAE \ 8F6F \ 96C5 \ 9ED1
Microsoft JhengHei \ 5FAE \ x8F6F \ 6B63 \ 9ED1 \ 4F53
New nnsimsun \ 65B0 \ 5B8B \ 4F53
New fine body PMingLiU \ 65B0 \ 7EC6 \ 660E \ 4F53
Fine body MingLiU \ 7EC6 \ 660E \ 4F53
Standard body DFKai-SB \ 6807 \ 6977 \ 4F53
Imitation Song FangSong \ 4EFF \ 5B8B
KaiTi \ 6977 \ 4F53
Imitation Song _ GB2312FangSong_GB2312 \ 4EFF \ 5B8B_GB2312
_ GB2312KaiTi_GB2312 \ 6977 \ 4F53_GB2312


Mac OS
*文 ststheiti Light [STXihei] \ 534E \ 6587 \ 7EC6 \ 9ED1
*STHeiti \ 534E \ 6587 \ 9ED1 \ 4F53
STKaiti \ 534E \ 6587 \ 6977 \ 4F53
文 STSong \ 534E \ 6587 \ 5B8B \ 4F53
STFangsong \ 534E \ 6587 \ 4EFF \ 5B8B
Li ProLiHei Pro Medium \ 4E3D \ 9ED1 Pro
Lisong ProLiSong Pro Light \ 4E3D \ 5B8B Pro
BiauKai \ 6807 \ 6977 \ 4F53
Apple li中 Apple LiGothic Medium \ 82F9 \ 679C \ 4E3D \ 4E2D \ 9ED1
Apple lixisong Apple LiSung Light \ 82F9 \ 679C \ 4E3D \ 7EC6 \ 5B8B

Marked in the above table * as a common font

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.