In the developer tools, navigate to the "Audits" tab.
I use Python's rver: python -m rver 8000.Launch an HTTP server in the same directory.Copy the above HTML file to a directory on your machine, and name it index.html.This audit uses Lighthouse, the same tool that powers PageSpeed Insights. To test how this Google Font impacts page load performance, I used the performance audit in Chromium's DevTools. Because this HTML contains almost nothing, it will give us a good sense of how much the Google Font is impacting our page loads. This webpage doesn't look like much, and that's the idea.
That's just what I did for this HTML document: When you find a funky font at Google Fonts and you're ready to use it, the instructions look a little like this:Įasy enough! Add that element to the of your website, and you're ready to use your selected typeface in your CSS font-family rules. Let's start by seeing why Google Fonts slows down page loads, then looking at how we can limit that performance penalty.
So, how can a person use Google Fonts without sacrificing too much in page load speed? This post will answer that question, and I hope it will also serve as a blueprint for how to research and improve page load times in general. Google's PageSpeed Insights ranks website page load times out of 100, and 100/100 is always my goal. If you've read my post about building this blog with Pelican, you'll know that I like quick page loads. Instead of a loading all web resources from your own server, adding a Google Font means that your website now depends on font files from Google's servers, too. That nice-looking font comes at a price, however: page load times.Īdding a custom Google Font, instead of using an OS-native font stack like Bootstrap does, inevitably increases page load times. It's easy-to-read and has interesting italics, which makes it a good fit for a Markdown-focused website. The font I chose is IBM Plex Mono, a monospaced font from IBM. (Check out a pre-launch version at Table to Markdown!) I wanted the site to be minimalist but not too boring, so I opted to use a custom font from Google Fonts to add one piece of flair. Recently, I started working on a small web application that converts tables copied from spreadsheets and websites into well-formatted Markdown tables. Thanks to some helpful comments on Reddit, I've updated this post with more information about the Google Fonts stylesheet's features, information about the drawbacks of this method, and alternate ways of loading Google Fonts. JohnFraney.ca # Django, Vue, and other things, too Improve Page Speed when Using Google Fonts Take into account the family’s many weights, including condensed and extra condensed designs, and extended language support and you have yourself a tool you’ll be thrilled to return to, time and again.Improve Page Speed when Using Google Fonts Its Bold styles tend to echo the softer, more open style of the light while the extra bold and ultra bold have their own vivid personalities, but each of them would make for an eye-catching headline. This toolkit family includes a wide range of styles including the standards such as Light-which is open and elegant-and a Regular that, with its flat-bottomed d, flat-topped p and q and triangular-topped t, has a more compact and muscular appearance. Gill Sans has reached this level of near-ubiquity for one simple-and very good-reason: it is an exceptionally distinctive design with a potential range of use that is almost limitless. Gill Sans is a humanistic sans serif family that, while is considered by many to be quintessentially British in tone and concept, has been used in virtually every country and in nearly every application imaginable.