CSS字体Unicode范围 [英] CSS Font Unicode Range

查看:109
本文介绍了CSS字体Unicode范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

@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

我使用上面的代码,并且打算将这种字体用于指定的unicode范围内的字符,并且排除包括默认英文字符在内的任何其他字符.

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.

但是,在我的网站上,它仍然以该字体显示其他字符.如您所见,上一个仍然使用定义的字体显示英文,而第二个使用sans-serif.我该如何解决这个问题?

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. How can I solve this problem?

非常感谢您的帮助.

推荐答案

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

您的一个字符范围包含一个 en破折号(U + 2013),而不是ASCII连字符减号.

One of your character ranges contains an en dash (U+2013) instead of an ASCII hyphen-minus.

这篇关于CSS字体Unicode范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆