I'm preloading google fonts as follows
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preload" href="https://fonts.googleapis.com/css2?family=Fira+Code&family=Montserrat:wght@400;500;800&display=swap" as="style">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fira+Code&family=Montserrat:wght@400;500;800&display=swap">
However, lighthouse still gives me 151ms Cumulative Layout Shift, and i can see the font flash. Why doesn't the preloading work?
Also. If i change from display=swap to optional, lighthouse says "Fonts with font-display: optional are not preloaded". Which must mean that it is in fact not pre-loaded