WordPress Custom font not fount

I created a custom wordpress theme from scratch
I am trying to use custom font
what I done
upload font to wp-content/themes/mythemefolder/fonts/fontfolder
in theme default style.css

@font-face {
        font-family: "fontname";
        src: url('fonts/fontfolder/fontname.otf');
*{font-family: "fontname";}

when I visti page text are not in desired font
I check console show error :

Failed to load resource: the server responded with a status of 404 (Not Found)  http://domainname.com/wp-content/themes/mythemefolder/fonts/fontfolder/fontname.otf 

path of font in console is correct but still font not working

what mistake I am making

thanks in advance for help

Read more here: WordPress Custom font not fount

Leave a Reply

Your email address will not be published. Required fields are marked *