我想用谷歌字体添加一个字体,我注意到一个奇怪的行为.
我想添加一个只有拉丁子集的字体,我不想要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) 我在我的网站中使用区域语言unicode font-face,但数字看起来不太好.
所以我想将新的font-style或css应用于数字..
请帮忙