
Wikimedia FontCDN – an anonymizing, privacy-first reverse proxy to Google Fonts - supercucumber
https://fontcdn.toolforge.org
======
SquareWheel
As much as I hate to post a pessimistic "Just do X instead" comment... why not
just serve the fonts locally?

It's no more difficult than serving any other asset. And if you're worried
about privacy, then serving files locally removes any dependency on a third-
party server at all (or two in this case).

~~~
chrismorgan
There _used_ to be advantage to using global CDNs: you would only need to
download each font file once.

But now, browsers don’t share caches between origins for privacy reasons
(“hmm, judging by how fast these ten resources loaded (and how slowly these
other thirty resources loaded), you had these ten in your cache; and such-and-
such a sensitive site just _happens_ to load those ten resources and none of
the rest…”), so that reason has turned from a positive into a probable
negative, because it’s having to look up another domain name and open a new
TLS connection—though if you’re serving the resources with HTTP/1.1 it _might_
still be faster coming from a different origin, if you’re loading enough
resources.

After that, the main advantage of Google Fonts doing the CSS serving is that
it varies the CSS it serves by user-agent, to give you what your browser will
cope with best, whether it be EOT, TTF, WOFF, WOFF2, maybe they vary the
response in other ways as well, I’m not sure. In practice, I think that
benefit has run its course: I recommend that people don’t even bother with the
bulletproof web fonts formula for supporting all the formats, but just serve
woff2: fonts are fundamentally supposed to be optional (icon fonts are
generally bad), and users of such ancient browsers as IE, EdgeHTML < 14,
Firefox < 39, Chrome < 36 and Safari < 10/12 don’t need the fonts anyway.

So then, I say that the only thing that remains is the neat packaging of the
font files, subsetting, _& c._ And I say copying the files and serving them
yourself is overall probably a very wise idea.

~~~
fr3dx
> But now, browsers don’t share caches between origins for privacy reasons

I didn't heard about this thing until today, are you sure that it is already
implemented in all major browsers? I have found this source [1] but for what I
can tell, at the moment this feature is behind a flag in chromium and firefox
(maybe it is already implemented in Safari).

[1] [https://www.jefftk.com/p/shared-cache-is-going-
away](https://www.jefftk.com/p/shared-cache-is-going-away)

~~~
dna_polymerase
[https://www.chromestatus.com/feature/5730772021411840](https://www.chromestatus.com/feature/5730772021411840)

[https://bugzilla.mozilla.org/show_bug.cgi?id=1536058](https://bugzilla.mozilla.org/show_bug.cgi?id=1536058)

[https://bugs.webkit.org/show_bug.cgi?id=110269](https://bugs.webkit.org/show_bug.cgi?id=110269)

------
ryan_lane
This is on toolforge, so while it's technically on Wikimedia run
infrastructure (Wikimedia cloud services), the tool itself is maintained by a
community member. If you use this outside of the Wikimedia cloud services
environment (toolforge and Cloud VPS), then you're asking for trouble.

My guess is someone added this tool for other tools to use. There's no way
this is being used on the production wikis.

~~~
mmarx
> My guess is someone added this tool for other tools to use.

That's precisely what it's for; and there's a cdnjs mirror as well, for the
same reason.

------
whoopdedo
My idea, a browser extension that downloads a mirror of the most popular fonts
and intercepts requests to google inserting device local CSS instead. Might
not be desirable for mobile devices, but with ample storage you get faster
page loading and no telemetry sent to anyone.

~~~
mada360
That sound exactly like what decentraleyes does
[https://decentraleyes.org/](https://decentraleyes.org/)

~~~
gruez
AFAIK it only caches js files, not fonts.

------
KayL
But this is too slow to me. 400ms vs 23ms. I'm in Asia and it redirects me to
new zealand. other wiki site redirected to US server.

where can I find the wiki CDN network map?

~~~
est31
This has a map of the Wikipedia colocation sites:
[https://wikitech.wikimedia.org/wiki/Clusters](https://wikitech.wikimedia.org/wiki/Clusters)

I'm wondering a bit about your new zealand redirect, as there is no colocation
site in new zealand on that map at least.

~~~
KayL
my bad. that's Netherlands

------
forty
Why are people adding external fonts everywhere? Aren't there enough fonts
built in browsers to make most people happy?

~~~
Doxin
There are exactly 0 fonts built in to browsers. You could try using fonts
installed on the system but that tends to devolve in a cross-platform
compatibility mess.

~~~
WorldMaker
There is a set of 7 fonts widely distributed enough to be considered "web
safe" if not built in to browsers (and at one point most browsers installed
them if they were not already supported by the OS, but today almost all OSes
support them directly so most browsers no longer ship them directly), but it's
not a particularly great set: Verdana, Trebuchet, Arial, Comic Sans, Georgia,
Times New Roman, and Courier New.

Even if those were somehow the 7 "best" fonts in all of the world, there's
still a need to support external fonts because fonts are a tool for creative
expression. Creative expression might not always be what you want from the
web, but as a 90s Web fan, a web without creative expression would be a
terrible web.

~~~
Doxin
Notably that set of fonts excludes most linux installs, given their licenses.

~~~
WorldMaker
Fair point, many distros don't bundle by default the fonts because they
disagree with the free as in beer but not free as in speech nature of the
fonts.

Though many distros still make them available for those that want them. For
instance, in Ubuntu they are included in the "Restricted Extras" meta-package,
or specifically in the ttf-mscorefonts-installer package.

------
floatingatoll
The same objections that apply to Cloudflare in various other “anonymization
via CDN” posts apply here as well: it’s only anonymizing the data Google sees,
but the operator of the proxy can still harvest and profit from non-anonymous
data. Be sure you trust the operator of this proxy^ to act in your best
interest when evaluating whether to use this.

^
[https://news.ycombinator.com/item?id=23780853](https://news.ycombinator.com/item?id=23780853)

------
adrianN
I just set browser.display.use_document_fonts=0 and don't worry about the
privacy implications of font loading anymore.

~~~
GoblinSlayer
I do it primarily because google fonts are so hideous, it's impossible to
read.

