I should know this, but if I visit a website which specifies a font and provides it via something like a Google Fonts CSS snippet (which afaik tracks users), do I prevent the request to Google if I have the font installed locally?
Seems like a good low-hanging fruit optimization for browser privacy: provide a list of popular Google / TypeKit / etc fonts for local download & shim the js to prefer the local fonts. Saves on HTTP transfers and improves privacy while maintaining prettiness.
@dried i think google font CSS is set up to prefer local fonts; the problem is that the user still has to load the CSS file. this is a privacy concern because it sends google your IP address and potentially the page you are on (unless the link has no-referrer set i believe). if you could use an adblocker to block the entire google fonts domain though, the default fallback should just be to use local fonts with the same name should they exist
there shouldn't be any JS involved; it's all just declarative CSS and HTTP requests
@dried i think the most common approach is a <link> element in the header to a google-hosted stylesheet
you can also include it in other ways, like an @import CSS rule, but <link> is the easiest and most popular (or was a year or two ago when i last looked into it)
and yeah, it's definitely possible to parse that query parameter for those fonts
@Lady yeah it's been a time since I've included a google font as well
Ok cool so it's possible, now i just need the time to develop it or convince someone else to