Why are not my font faces shown?

0

< a href="https://i.stack.imgur.com/1RHGu.png">
font face file

@font-face {
    font-family:Hurme1;
    font-weight: 48;
    src:url(fonts/HurmeGeometricSans3Bold.otf);

}
---------------------------------------------------------------
index.html
  <link href="./css/fonts.css"rel="stylesheet" >
-----------------------------------------------------------
styles.csss
h1{
font-family:Hurme1;
    color :#FFFFFF;
    text-align: center

}
    
asked by 21.08.2017 в 19:11
source

2 answers

1

It's because the url is not pointing well to your fonts folder; if you are in the css folder you must first leave that folder and then enter the source to send them from your css file and always try to add quotes to the URL to make them more readable. In your index file you just have to send your style.css call

CSS.

    @font-face {
    font-family: 'Hurme1';
    font-weight: 48;
    src:url('../fonts/HurmeGeometricSans3Bold.otf');
}
h1 {
  font-family: 'Hurme1';
}
    
answered by 21.08.2017 в 21:33
0

In the url where the error is marked, it is indicated that the fuentes folder is inside the css folder:

../tespage/css/fuentes/..

But according to the structure you have, besides there is not a folder called fuentes , the folder fonts is in the root directory to the pair of the folder css ;

../css/..
../fonts/..

So you have to tell him to navigate to the previous directory and then access the fonts folder like this:

src:url('../fonts/HurmeGeometricSans3Bold.otf');
    
answered by 21.08.2017 в 22:12