CSS Common font Unicode encoding

Source: Internet
Author: User

To set the font name in CSS, it is possible to write Chinese directly. However, when the file encoding (GB2312, UTF-8, etc.) does not match, it will produce garbled errors.

To do this, you can avoid these errors by using Unicode encoding directly in CSS to write font names. Using Unicode to write Chinese font names, the browser can be correctly parsed.

For example:

font-family: "\5fae\8f6f\96c5\9ed1", which indicates that the font is set to "Microsoft Black".

Common Chinese Font Unicode encoding

Font name English name Unicode Encoding
Song Body SimSun \5b8b\4f53
New song Body Nsimsun \65b0\5b8b\4f53
Blackbody Simhei \9ed1\4f53
Microsoft Ya-Black Microsoft Yahei \5fae\8f6f\96c5\9ed1
Chinese fine Black Stxihei \534e\6587\7ec6\9ed1

CSS Common font Unicode encoding

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.