left arrow

Fonts are Fat!

December 29, 2020

fonts, http, performance

Revamping my blog was relatively straight forward. I just took the existing logic, added some CSS, a few new fonts and boom... my website was slower than my first program which had 4 nested inner loops...

My (current) Solution

I was using the gatsby-plugin-web-font-loader which would fetch my google fonts asynchronously. The home section font is used only once. I realized it would be more efficient to deploy the app with the font locally. Especially since it's the first font that needs to be loaded. This resolved the issue and now the page is loaded with the correct font. Unlike previously where, while the font was being fetched, the page would load with some default browser font.