简体   繁体   English

CSS字体Unicode范围

[英]CSS Font Unicode Range

@font-face{
    font-family:Nanum Barun Gothic;
    src:url(NanumBarunGothic.ttf);
    unicode-range:U+AC00-D7A3,U+1100–11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;
}
body{font-family:Nanum Barun Gothic, sans-serif;}
// I confirmed that the sans-serif font is not the one here by checking with Chrome developer tool

I use the above code and intend to ONLY use this font for characters in the designated unicode-range, and excluding any other characters including the default English one. 我使用上面的代码, 打算将这种字体用于指定的unicode范围内的字符,并且不包括任何其他字符,包括默认的英文字符。

However, in my site, it stills display the other characters in this font. 但是,在我的网站上,它仍然以该字体显示其他字符。 As you can see, the upper one still displays English in the font defined, and yet the second one uses sans-serif. 如您所见,上一个仍然使用定义的字体显示英文,而第二个使用sans-serif。 How can I solve this problem? 我怎么解决这个问题?

Much help is appreciated. 非常感谢您的帮助。

U+AC00-D7A3,U+1100–11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF
                  ^

One of your character ranges contains an en dash (U+2013) instead of an ASCII hyphen-minus. 您的字符范围之一包含一个破折号 (U + 2013),而不是ASCII连字符减号。

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

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