Instructions for importing fonts with rel="preload"
attribute using CSS:
@font-face{
font-family:fname;
src:url(../fonts/fname.woff) format('woff'),
url(../fonts/fname.ttf) format('truetype');
font-weight:400;
font-display: swap;
rel: preload;
}
To use the rel="preload"
HTML attribute when importing fonts using CSS, add the font-display: swap
and rel: preload
declarations to the @font-face
rule.