News for hackers. Stuff that matters.
Re:Self-host your fonts for better performance by sergeykish on Saturday December 05, 2020 @09:02AM (#25314609)
Unfortunately

> If the local() function is provided, specifying a font name to look for on the user's computer, and the user agent finds a match, that local font is used. Otherwise, the font resource specified using the url() function is downloaded and used.

https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face

And this is not the case for Google Fonts anymore, for example

https://fonts.googleapis.com/css2?family=Noto%20Sans

I've created issue

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

----

>> Any correctly-coded website will try a local source first, which should help a lot for poor connections.

> Then Google Fonts is not correctly coded, as it'll use remote font only. And myriads of websites reusing Google Fonts snippets. To try local source first, you have to explicitly ask for it in @font-face/src which Google Fonts does not do.

> So installing font into your OS won't help you with any website using Google Fonts service.

https://news.ycombinator.com/item?id=25301830

There are no comments on this comment yet.