相关疑难解决方法(0)

我怎样才能将拉丁子集与Google字体WOFF2文件一起使用?

我想用谷歌字体添加一个字体,我注意到一个奇怪的行为.

我想添加一个只有拉丁子集的字体,我不想要latin-ext,cyrillic或者cyrillic-ext子集,以减轻代码.我明白这是默认行为,所以我这样做了:

<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Philosopher">
Run Code Online (Sandbox Code Playgroud)

在Firefox(以及其他不支持WOFF2的浏览器)中,我得到了正确的输出:

@font-face {
    font-family: 'Philosopher';
    font-style: normal;
    font-weight: 400;
    src: local('Philosopher'), url(http://fonts.gstatic.com/s/philosopher/v7/OttjxgcoEsufOGSINYBGLbrIa-7acMAeDBVuclsi6Gc.woff) format('woff');
}
Run Code Online (Sandbox Code Playgroud)

但在Chrome中,我得到了这个:

/* cyrillic */
@font-face {
    font-family: 'Philosopher';
    font-style: normal;
    font-weight: 400;
    src: local('Philosopher'), url(http://fonts.gstatic.com/s/philosopher/v7/OttjxgcoEsufOGSINYBGLV4sYYdJg5dU2qzJEVSuta0.woff2) format('woff2');
    unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
    font-family: 'Philosopher';
    font-style: normal;
    font-weight: 400;
    src: local('Philosopher'), url(http://fonts.gstatic.com/s/philosopher/v7/OttjxgcoEsufOGSINYBGLZQV2lvL5Ba9FjAYK6Lx0Qk.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
Run Code Online (Sandbox Code Playgroud)

我想,也许拉丁子集不再是默认行为了,所以我添加了我<link>subsetGET参数:

<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Philosopher&subset=latin"> …
Run Code Online (Sandbox Code Playgroud)

webfonts woff google-font-api

17
推荐指数
1
解决办法
4089
查看次数

如何将css仅应用于文本内部的数字/或任何<p> <p>元素?

我在我的网站中使用区域语言unicode font-face,但数字看起来不太好.

所以我想将新的font-style或css应用于数字..

请帮忙

javascript css jquery fonts numbers

8
推荐指数
2
解决办法
1万
查看次数

标签 统计

css ×1

fonts ×1

google-font-api ×1

javascript ×1

jquery ×1

numbers ×1

webfonts ×1

woff ×1