I am trying to use a custom font which is stored locally.
When I put the font in pjroot/content/images and load in my css, it is working fine.
But when I put the font in other folders like pjroot/content/data or pjroot/content/fonts(custom folder), I am getting 404 error.
It seems like only pjroot/content/images folder is public.
Where and how can I change the configuration?
If you want to use a custom font, your best place to upload it is via your theme. The content/images folder is used for images, and the content/data folder is used for json exports and the database (for sqlite users), so itβs intentionally not made public.
If your fonts are in "font folder within assets folder of your theme. And your custom css file is in assets/built/ folder.
This means your font folder and built folder are in the same location.
Technically it should work. I have also tested it in my local install, in Casper theme. And it is working fine without any error.
Will you double check every thing again? I mean, folder location and spelling.
As you mentioned your CSS code above, there is no β/β at the start of the font URL before ββ¦β
This type of error occurs when there is a β/β at the beginning of the URL.
Also, you can use an online font converter to convert .ttf font to other format of fonts.
Font Squirrel has a web font generator tool which is among popular ones.