The layout shift caused by Montserrat loading was significantly increasing our measured CLS. Although most users aren’t affected by this layout shift because Google Fonts is pretty fast, we still need to fix this for SEO.
There are ways to
preload fonts in more recent versions of Google, but we came up with a neat alternative:
change the fallback font. DejaVu Sans is much closer to Montserrat, which means minimal layout shift and a near-zero CLS with no special browser features or extra JavaScript.