How to import fonts from a local file, to my HTML project [duplicated]

1

I have a problem and I really do not give my solution. I have some otf files, which are some sources that a designer has given me. I'm importing them in the following way:

        @font-face {
            font-family: Verlag;
            src: url('/wp-content/themes/raisedRealTheme/fonts/Verlag-Black.otf'), 
                 url('/wp-content/themes/raisedRealTheme/fonts/Verlag-Bold.otf'), 
                 url('/wp-content/themes/raisedRealTheme/fonts/Verlag-Bold.otf'),
                 url('/wp-content/themes/raisedRealTheme/fonts/Verlag-Book.otf'), 
                 url('/wp-content/themes/raisedRealTheme/fonts/Verlag-Light.otf'),
                 url('/wp-content/themes/raisedRealTheme/fonts/Verlag-XLight.otf');
        }

        body
        {
            font-size: 24px;
            font-weight: 900;
            font-family: Verlag;
        }

But in my HTML I do not see that it is loading, because I'm missing an error of

  

Failed to load resource: the server responded to a status of 404   (Not Found)

But if I click on the browser link, I can see the source. Here I leave an image of my path, to see that I am failing.

P.D: It's a wordpress project.

    
asked by Wilfredo 03.01.2017 в 17:34
source

1 answer

3

After publishing the question, I realized that it was like this:

@font-face {
    font-family: Verlag;
    src: url('../fonts/Verlag-Black.otf'), url('../fonts/Verlag-Bold.otf'), url('../fonts/Verlag-Bold.otf'),
    url('../fonts/Verlag-Book.otf'), url('../fonts/Verlag-Light.otf'),
    url('../fonts/Verlag-XLight.otf');
}

As you put in the comment, Wordpress there is a moment that needs the wp-content/..../.... and for this case it is not necessary.

    
answered by 03.01.2017 / 17:38
source