Load Google Fonts Faster in WordPress
coffeencoding.com
coffeencoding.com
Also, this isn't as performant as correctly self-hosting font files (because of separate DNS lookup to google font domain involved).
HOpe this helps for those who are wondering what sans-serif does exactly
- Gulim and Dotum, two sans-serif typefaces introduced with Windows 95 (!!!!!!) [1]. They have hand-fitted bitmaps (which are not that bad for small pixelated displays) and awfully hinted vectors. Their monospaced variants (Gulimche & Dotumche) still remain as the only portable choice for monospaced Korean fonts.
- Malgun Gothic, a sans-serif typeface introduced with Windows XP. Yeah this got much better! Except that it is not well hinted and thus eye-jarring for smaller texts (hopefully this concern will be obsoleted in the future). Also in my opinion it is slightly unbalanced than other alternatives.
- Noto & Source Han Sans CJK, a sans-serif typeface shipped with Android. This is even better than Malgun Gothic, except that it does not ship with Windows (hahaha). Its monospaced version is also very good, except that it does not ship with Windows and Android (you read right).
- And of course Apple Korean fonts. In the past they shipped AppleGothic which is slightly better than Malgun Gothic, and nowadays they ship Apple SD Gothic Pro which pretty much matches well with Noto Sans CJK.
Thus you go with Noto Sans CJK, Apple SD Gothic Pro, Malgun Gothic, and (hopefully never) Gulim or Dotum. And you know what? There is essentially a single different Korean font acceptable for each platform and their metrics drastically vary (Malgun Gothic is the biggest outlier IMO). And note that serif fonts are completely absent in this list---there is really the single most portable serif Korean font there, namely Batang, in the same page with Gulim and Dotum. If you want serif fonts in your web page you are simply doomed.
There are numerous attempts to improve Korean web typography. Spoqa Han Sans [1], an extremely subsetted version of Noto Sans CJK, is a good example. And it still weighs 441KB---at such size it will be a full-featured font for English but for Korean it is barely comfortable. And I don't know what can be done with this.
[1] Their prototypes were much older, back to Windows 3.1.
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;If you really want to fully control the font experience, download the font package and CSS from https://google-webfonts-helper.herokuapp.com/ and host them yourself, on the same CDN as your JS and CSS. That way they'll load in parallel with your site's other assets and you have full control over all cache control headers as well.
you still have to wait until the css declaration is fetched and parsed, so don't forget a Link: prefetch header on the response (or http push, but a prefetch in the http response header is easier to implement)