Use Web Fonts for Your Site

Create a unified experience for users.

Why not default fonts?

By default, we like to use platform's specific fonts, e.g. Microsoft YaHei on Windows, PingFang SC on macOS (for Simplified Chinese users). Of course, these fonts are beautiful and practical. That's why they are chosen to be the basic fonts of OS. And all we need to do is set font-family to sans-serif and there will be a good-looking UI for our website.

However, there is one problem. Although the UI is pretty for every platform, they differ from each other so much that it's in fact quite bad. I'd rather maintain a unified experience for users whatever OS or browser they may use.

Why web fonts?

Fonts are rather small now, thanks to modern format like woff2. Even languages like Chinese can have not so large font file, which is just perfect for using it on websites. What makes it even better is that there is unicode-range directive, dividing fonts into multiple parts, so that users only need to download those in use.

Privacy issues?

Websites using web fonts usually use Google Fonts or other third-party services, which is of course bad for users' privacy. Some people may want to self-host fonts, but it's often hard to divide fonts into multiple parts properly, and users will have to download the whole font file, wasting bandwidth and time.

My sites (all of them under ononoki.org apex domain) use font.ononoki.org for reverse proxy of fonts.googleapis.com and fonts.gstatic.com. It protects users' privacy by hiding IP address and some sensitive headers (e.g. Cookie, Origin, Referer), so that Google never knows your identity.

If you want to know how to set up a reverse proxy of Google Fonts, see this post.