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. The XP system does not support Chinese like Microsoft Jas.
Scenario One: You can use English instead. For example font-family: "Microsoft Yahei".
Scenario Two: 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.
font-family: "\5fae\8f6f\96c5\9ed1", which indicates that the font is set to "Microsoft Black".
You can use Escape () to test what font belongs to.
| Font name | English name | Unicode encoding
| --------- | --------------- | -------------------- |
| Song Body | SimSun | \5b8b\4f53 |
| New Arial | Nsimsun | \65b0\5b8b\4f53 |
| blackbody | Simhei | \9ed1\4f53 |
| Microsoft ya Black | Microsoft Yahei | \5fae\8f6f\96c5\9ed1 |
| Italics _gb2312 | kaiti_gb2312 | \6977\4f53_gb2312 |
| Official Script | Lisu | \96b6\4e66 |
| Young Garden | Youyuan | \5e7c\5706 |
| Chinese Fine Black | Stxihei | \534e\6587\7ec6\9ed1 |
| Fine Ming Body | MingLiU | \7ec6\660e\4f53 |
| Shin-ming Body | PMingLiU | \65b0\7ec6\660e\4f53 |
Reference website: http://code.ciaoca.com/style/cssfont2unicode/
CSS Unicode Font