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.

Follow

@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

@Lady oh do they give it as an include now instead of the @ font-face directly? I am currently using ublock origin to block 3rd-party fonts but I'm dreaming of a slicker setting that just downloads & uses the local fonts. The CSS includes must have query params to specify the fonts that could be interpreted & intercepted by this setting / extension I"m dreaming of.

(with you on the privacy concern; facebook uses 1px gifs for ad tracking from what I remember -- any http request would do it)

@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

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.