I would like to preload Material Icons font thanks to:
<link rel="preload" href="https://fonts.gstatic.com/s/materialicons/v125/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2" as="font" type="font/woff2" crossorigin="anonymous">
In fact, it works!
However, in the filename, we have a hash/UUID: v125/flUhRq6tzZclQEJ-Vdg-IuiaDsNc
; consequently, if Google publishes a new release, for example v126/sjboabchdiamblq-Abf-abvichef
, then my preload won't work!
For more details, I use their CDN like this:
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
Which returns this CSS:
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/materialicons/v125/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');
}
.material-icons {
font-family: 'Material Icons';
[...]
}
Notice: I'm working with Angular, and I want the loading of the font start immediately, and not when the application is loaded, i.e. when a Material Icon is displayed.Moreover, even if the CSS file loads immediately, the font won't start loading until a Material Icon is displayed.