We've all heard that famous limerick: Opinions are like a--holes, everyone has one and they all stink! I wouldn't go that far in describing a poll question I posed on Twitter earlier today, but at times that can be warranted.
Just like so many things on the technical side of web development, there are a lot of conflicting thought processes on a variety of topics. Spaces or Tabs? Vim or Nano? Sublime Text or VSCode? Git rebase or merge?
There will likely be endless debates on a variety of topics that developers will debate. Debate is good. If it helps foster positive change or simply helps you produce a better website for your client, then the debate was worth having.
So that led to the following tweet 👇
That's quite the small number to base an entire article off of, but it got me thinking. So I headed to Google and came across a few articles on the matter:
If you're using hosted Google Fonts, you may want to rethink that if you care about performance. The old CDN argument is no longer valid.
Yet when you look at the official Google Documentation it certainly tilts the vote in another direction.
We recommend copying the code snippets available under the "Embed" tab in the selection drawer directly into your website’s HTML and CSS.
The above certainly gives the CDN option more credence. Plus with all of the new font effects coming to the Google Font API it seems like a better move to just utilize the CDN. This way as new features arise, or font families change, you can benefit from those features without having to refresh your locally hosted Google Fonts.
Yet there's this video that skews the vote in the other direction:
Yes and no. The beautiful thing about this debate is that you can choose which option works best for your project. We know that each option offers varying degrees of performance boosts. We also know that both have their own set of pros and cons.
So choose the option that works best for you.