【问题标题】:CSS Font Unicode RangeCSS 字体 Unicode 范围
【发布时间】:2017-01-07 19:47:17
【问题描述】:
@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 范围内的字符,并且不包括任何其他字符,包括默认的英文字符。

但是,在我的网站中,它仍然以这种字体显示其他字符。如您所见,上面的仍然以定义的字体显示英文,而第二个使用的是无衬线字体。我该如何解决这个问题?

非常感谢您的帮助。

【问题讨论】:

    标签: css unicode fonts


    【解决方案1】:
    U+AC00-D7A3,U+1100–11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF
                      ^
    

    您的一个字符范围包含 短划线 (U+2013) 而不是 ASCII 连字符减号。

    【讨论】:

    • 糟糕,完全忽略了这一点!谢谢
    猜你喜欢
    • 2012-11-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-07-02
    • 2013-01-27
    • 1970-01-01
    • 1970-01-01
    • 2018-05-10
    相关资源
    最近更新 更多