Hacker News new | ask | show | jobs
by harrisonjackson 2027 days ago
From the google fonts FAQ it says they will use the locally installed font if possible

https://developers.google.com/fonts/faq#can_i_download_the_f...

> Note that when browsers render websites that use the Google Fonts API, they will check if a font is installed locally on your computer, and prefer to use the local version over web fonts.

1 comments

Here's snippet from CSS served to my browser:

https://fonts.googleapis.com/css2?family=Inconsolata&display...

    @font-face {
      font-family: 'Inconsolata';
      ...
      src: url(https://fonts.gstatic.com/s/inconsolata/....woff2) format('woff2');
  unicode-range: U+0000-00FF, ...;
Wow! That used to not be the case. I can't find anything about the change but it used to include a check for local(font-face) in the sources.

Some random references to it w/ the snippets:

https://stackoverflow.com/a/52413970

https://stackoverflow.com/questions/18303215/how-can-i-preve...

https://github.com/google/fonts/issues/2620

Thank you, I gave advice and missed this change.

I've created issue "Local font name makes web accessible", and I hope it would be fixed.

https://github.com/google/fonts/issues/2855