Would it make sense to mirror Google web fonts?
It would be useful as some countries block/throttle connections to Google. _cough_ China _cough_
@dandyhat That's an interesting idea mate. I'll look into it.
I think it's probably not going to be possible for us to do that due to licensing issues.
Please contact Ilya Grigorik ( http://www.igvita.com/ ) at Google
If there are any licensing issues they can be sorted!
He is aware of the issue and is involved with the web fonts team.
Hey @igrigorik, how does something like this sound to you?
I can't comment on the legal aspect, but I can tell you that on the technical side its not a simple matter of mirroring a bunch of files. Much of the point of Google Fonts is the dynamic serving of the fonts, which is built into the front-ends which serve the files, with 30+ variations per font (and growing), with updates for better compression, etc.
I don't think it's a practical solution.. And for that matter, Google Fonts should work just fine in China!
Thanks for the explanation @igrigorik. I think you've presented a very strong case for the complexity of mirroring the fonts being beyond our current capabilities, and the great point of unnecessary duplication of effort.
@igrigorik:
When connectivity to Google is dropped (e.g. when using Google Instant and the url becomes too long the connection is dropped) it is also dropped for the web fonts. Which causes sites using web font to hang.
Would giving you a HAR of this help?
@dandyhat I'm not sure I follow. If the connection is dropped - for whatever reason - then of course the site won't complete rendering. If you want more fine-grained control over web-font loading, you can use the JS loader provided by Google WebFonts (as opposed to the CSS include).
Hi there,
In case that could help, the ustclug.org website hosts a Chinese mirror of Google web fonts:
https://fonts-gstatic.proxy.ustclug.org
For instance:
https://fonts-gstatic.proxy.ustclug.org/s/raleway/v12/1Ptrg8zYS_SKggPNwJYtWqZPAA.woff2
They also hosts a mirror of the associated CSS:
https://fonts.proxy.ustclug.org
For instance:
https://fonts.proxy.ustclug.org/css?family=Arapey:400italic,400
To be noted that the useso.com mirror (http://fonts.useso.com) is not available anymore.
Last but not least, it seems that the GFC (Great Firewall of China) is now accepting connections to:
http://fonts.googleapis.com
http://fonts.gstatic.com
(tested today from Shanghai without VPN)
@seb-elico it there any license info?
Unfortunately, the Great Firewall of China seems to again be blocking http://fonts.googleapis.com.
One workaround is to dynamically switch to a Chinese proxy using the technique mentioned in: https://www.hongkiat.com/blog/google-fonts-china/ but using https://fonts.proxy.ustclug.org/css?family=Arapey:400italic,400 as the proxy.
Another option is to host the fonts on your own site using https://www.npmjs.com/package/google-fonts-webpack-plugin which is what we do with https://landscape.cncf.io/ .
Most helpful comment
Hi there,
In case that could help, the ustclug.org website hosts a Chinese mirror of Google web fonts:
https://fonts-gstatic.proxy.ustclug.org
For instance:
https://fonts-gstatic.proxy.ustclug.org/s/raleway/v12/1Ptrg8zYS_SKggPNwJYtWqZPAA.woff2
They also hosts a mirror of the associated CSS:
https://fonts.proxy.ustclug.org
For instance:
https://fonts.proxy.ustclug.org/css?family=Arapey:400italic,400
To be noted that the useso.com mirror (http://fonts.useso.com) is not available anymore.
Last but not least, it seems that the GFC (Great Firewall of China) is now accepting connections to:
http://fonts.googleapis.com
http://fonts.gstatic.com
(tested today from Shanghai without VPN)