Hello,
I am developing a project for my client that uses the ‘MyriadPro’ font, but it is not being loaded on my page and the following error message appears in my devtools:
"“The resource […] was preloaded using link preload but not used within a few seconds from the window’s load event. Please make sure it has an appropriate as value and it is preloaded intentionally”
Below is the import link in the base.html file (I applied the same structure to all source formats):
<link rel=“preload” href=‘{{ get_asset_url(“../../css/fonts/MyriadPro-BoldCondIt.woff2”) }}’ as=“font” type=“font/woff2” crossorigin>
Below is an excerpt from the main.css file:
@font-face {
font-family: ‘Myriad Pro’;
src: url(‘./fonts/MyriadPro-Regular.woff2’) format(‘woff2’),
url(‘./fonts/MyriadPro-Regular.woff’) format(‘woff’);
font-weight: normal;
font-style: normal;
font-display: swap;
}
Can anyone help me?
=================================================
Olá,
Estou desenvolvendo um projeto para meu cliente e que utiliza a fonte ‘MyriadPro’, mas ela não está sendo carregada na minha página e no meu devtools aparece a seguinte mensagem de erro:
"“The resource […] was preloaded using link preload but not used within a few seconds from the window’s load event. Please make sure it has an appropriate as value and it is preloaded intentionally”
Abaixo o link de importação no arquivo base.html (apliquei a mesma estrutura a todos os formatos da fonte):
<link rel=“preload” href=‘{{ get_asset_url(“../../css/fonts/MyriadPro-BoldCondIt.woff2”) }}’ as=“font” type=“font/woff2” crossorigin>
Abaixo um trecho no arquivo main.css:
@font-face {
font-family: ‘Myriad Pro’;
src: url(‘./fonts/MyriadPro-Regular.woff2’) format(‘woff2’),
url(‘./fonts/MyriadPro-Regular.woff’) format(‘woff’);
font-weight: normal;
font-style: normal;
font-display: swap;
}
Alguém consegue me ajudar?