CSS Font Unicode Range

2019-05-23 18:21发布

@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.

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?

Much help is appreciated.

1条回答
forever°为你锁心
2楼-- · 2019-05-23 19:19
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.

查看更多
登录 后发表回答