小编Our*_*aye的帖子

Roboto字体大胆与Firefox

我试着在我的网站上安装的Roboto,使用谷歌的字体,我感到绝望看到的Roboto是在Firefox比谷歌浏览器更大胆(更大胆).

这是我的代码:

<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,700" rel="stylesheet"> 
Run Code Online (Sandbox Code Playgroud)

p
{
    font-size: 1.4rem;
    line-height: 1.5;
    font-family: "Roboto", sans-serif;
    letter-spacing: 0;
    color: #313131;
}
Run Code Online (Sandbox Code Playgroud)

以下是Roboto Font的两个预览版,首先是Firefox,第二个是Chrome:

Firefox Roboto

Chrome Roboto

如您所见,Chrome Roboto更轻巧.

我不知道为什么会这样,但我在Google Font上找到了一些东西.在他们自己的代码上使用Firebug,我发现他们网站上使用的Roboto字体具有以下属性:

element.style {
    font-family: "Roboto script=all rev=1";
}
Run Code Online (Sandbox Code Playgroud)

当你删除"Script = all rev = 1"时,Roboto在Firefox和Chrome中变得更加大胆(但在Firefox中却如此).就像我正在进行的工作一样.

有人有答案,解决方案或什么?我觉得很寂寞,甚至连Google都没有告诉我这是什么script=all rev=1以及为什么它让Roboto在Google Font上更轻松.

css fonts google-font-api

5
推荐指数
1
解决办法
1519
查看次数

标签 统计

css ×1

fonts ×1

google-font-api ×1