Hacker News new | ask | show | jobs
by jfk13 2026 days ago
I've definitely seen use of src:local(...) in the CSS served by Google Fonts in the past, but they may have changed things, or perhaps it depends on details of the request, the detected browser, etc. YMMV.
1 comments

I just checked on a website I maintain, and it's looks like Google Fonts behaviour has changed. It definitely used to prioritise local fonts, and now it doesn't. In a way, I understand, because local fonts aren't always identical to the online ones, leading to weird bugs that might not be noticed at first (especially in languages that don't use Latin characters). Fonts also get updated over time.

When you select fonts on Google Fonts, the website instructs you to link to CSS hosted by Google, which is simple to implement, but not performant. Really, you would want to load that CSS asynchronously, so that the rendering of the whole website doesn't wait for Google Fonts. (Here's how you load CSS asynchronously, by the way: https://stackoverflow.com/q/32759272/247696 ) Or even better, host the fonts yourself.