I just started converting a website to Wordpress. Everything is ok till now except my custom font is not been found/rendered. 404! whereas it displays correctly in the non wp version of the site.
Inspecting the element I see
I noticed that the request URL is heading to an absolute address to instead of looking for the resource in a relative directory… I guess that is why it is not been founded. My style file the @font-face url is correctly set to the relative path.
Why is PG WP giving that address?
I made sure the style.css file is been uploaded in the wp setting page.
Anyone any hint?
So I needed to move my font inside my css folder.
" Assuming your style.css is located in a css folder located at the root of the theme, fonts could be a subfolder of that." Otherwise if you place the font in a different subfolder outside the css folder WP won’t get to it.
Thanks to Emmanuel @Emmanuel
Glad the problem is solved
I add that the problem is/was related to the use of @font-face in a CSS file and the location of the font file. Knowing that / at the start means that its looking for the font in the webroot.
Assuming your style.css is located in a css folder located at the root of the theme, fonts could be a subfolder of that.
Here is the illustration of the problem solved.