5

I try to install Roboto on my website, using Google Fonts, and I feel desperate to see that Roboto is bolder (much bolder) in Firefox than in Google Chrome.

Here are my codes :

<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,700" rel="stylesheet"> 

And

p
{
    font-size: 1.4rem;
    line-height: 1.5;
    font-family: "Roboto", sans-serif;
    letter-spacing: 0;
    color: #313131;
}

And here are two preview of Roboto Font, first with Firefox, second with Chrome:

Firefox Roboto

Chrome Roboto

As you can see, the Chrome Roboto is much lighter.

I don't know why it happen, but I've find something on Google Font. Using Firebug on their own code, I discover that the Roboto Font used on their website has attributes :

element.style {
    font-family: "Roboto script=all rev=1";
}

And when you remove the "Script=all rev=1", Roboto become much bolder in Firefox and in Chrome (but so much in Firefox). Just like on my Work in progress.

Does somebody have an answer, a solution, or something? I feel lonely to see that not even Google can inform me about what is script=all rev=1 and why it makes Roboto much lighter on Google Font.

Garf365
  • 3,619
  • 5
  • 29
  • 41
  • We too are seeing a significant difference in some font faces we use because the example Google Fonts page is using `rev=2` in their font face definition, whereas the API returns what appears to be Rev 1. I reported the issue about the specific font but Google never responded. I feel crazy that no one has mentioned it because it's a very popular font on there. – CalMlynarczyk Mar 19 '18 at 16:38

1 Answers1

0

The reason it is lighter is because Chrome is using a locally installed Roboto Font which does not have the bold version, and it is thus falling back to the thin version (rather than switching to the web font.) This is arguably a Chrome bug but I don't know of any existing report.

According to Force Chrome to use external font in CSS the special font name works because the Google Web Font stylesheet gives an alternate name for the font "Roboto script=all rev=1", which obviously doesn't exist on the user's local system and thus gets served by web font.

Community
  • 1
  • 1
Edward Z. Yang
  • 26,325
  • 16
  • 80
  • 110