Increase Speed of Google Web Fonts
Currently it is taking over a second to download google web fonts on slower connections. However, it doesn't appear that we are actually using any web fonts currently. We are referencing "Merriweather in our CSS, but we aren't loading that font. Our web font request should look like,
<link href="https://fonts.googleapis.com/css?
family=Roboto:300,400,500,700,400italic|Merriweather:400,400italic,700|Material+Icons"
Also, then style.scss
should be updated to use these fonts, specifically:
https://code.usgs.gov/ghsc/hazdev/earthquake-latest-earthquakes/blob/master/projects/earthquake-latest-earthquakes/src/styles/styles.scss#L22
We should be loading a non-google web font by default and swapping out for the web font once it loads. We might have to change the way that we are loading the web fonts.
Suggestions from Lighthouse: https://developers.google.com/web/updates/2016/02/font-display?utm_source=lighthouse&utm_medium=devtools
Using preload: https://www.freecodecamp.org/news/web-fonts-in-2018-f191a48367e8/