Solucionado (ver solução)
Solucionado
(ver solução)
5
respostas

Não consigo carregar a fonte

Olá.

Não consigo encontrar o motivo da fonte não ser carregada e aplicada ao projeto.

<!DOCTYPE html>
<html lang="pt-br">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>HOME | HZC</title>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Aboreto&family=Open+Sans&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/style.css">
</head>
5 respostas

Boa noite Enaldo, tudo bem?

Poderia mandar o trecho do seu código css para vermos como estão sendo atribuídas as fontes? Por gentileza.

ótimos estudos!

Olá Eliel, segue o código css

@font-face {               
    font-family: 'icones';
    src: url(../font/icones.ttf);
}


body {
    background-color: #1D232A;
    font-size: 'Open Sans', 'icones', sans-serif ;
    color: #FFFFFF;
}


.cabecalho {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background-color: #15191C;
    padding: 8px 16px;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.16);

}

.cabecalho__menu i::before {  
    content: '\e904';
    font-family: 'icones';
    font-size: 24px;

}

.cabecalho__notificacao i::before {
    content: '\e906';
    font-family: 'icones';
    font-size: 24px;
}

.cabecalho__logo {
    width: 40px;
}

.menu-lateral {
    display: flex;
    flex-direction: column; 
    background-color: #15191C;
    width: 75vw;
    height: 100vh; 
    position: absolute;
    left: -100vw;
    transition: 0.5s;

}

.menu-lateral--ativo {
    left: 0;
    transition: 0.5s;
}

.menu-lateral__logo {
    align-self: center; 
    padding: 16px;
    width: 118px;


}

.menu-lateral__link {
    height: 64px;
    color: #95999C;
    padding-left: 64px;
    display: flex;
    align-items: center;

}


.menu-lateral__link--ativo { 
    color: #FFFFFF;
    padding-left: 56px;
    border-left: 8px solid #FFFFFF;
}

.menu-lateral__link::before { 
    content: '';
    width: 24px;
    height: 24px;
    font-size: 24px;
    position: absolute;        
    left: 24px;
    font-family: 'icones';
    align-items: center;
}

.menu-lateral__link--inicio::before {
    content: '\e902';
    font-family: 'icones';
}

.menu-lateral__link--videos::before { 
    content: '\e90e';
    font-family: 'icones';
}

.menu-lateral__link--picos::before { 
    content: '\e909';
    font-family: 'icones';
}

.menu-lateral__link--integrantes::before { /
    content: '\e903';
    font-family: 'icones';
}

.menu-lateral__link--camisas::before {
    content: '\e900';
    font-family: 'icones';
}

.menu-lateral__link--pinturas::before{
    content: '\e90a';
    font-family: 'icones';
}
solução!

Boa noite Enaldo, tudo bem?

Notei um pequeno problema no código css:

body {
    background-color: #1D232A;
    font-size: 'Open Sans', 'icones', sans-serif ;
    color: #FFFFFF;
}

Se você notar, foi usado font-size para declarar a font-family.

Troque por isso aqui e a fonte já vai carregar:

body {
    background-color: #1D232A;
    font-family: 'Open Sans', 'icones', sans-serif;
    color: #FFFFFF;
}

Espero ter ajudado, ótimos códigos!

Muito obrigado Eliel!!

Detalhes (que não são detalhes) fazem toda a diferença.

Muito obrigado pela ajuda.

Imagina Enaldo, ótimos estudos! =)