Can't apply custom font (Tailwind CSS)

So I'm trying to add a custom font (not from Google Fonts), however, when I create a new @font-face property in the input.css file, it doesn't apply the font. Here's what I've done so far:
File structure
How I added the custom @font-face property.
6 Replies
GeorgeDash
GeorgeDashOP•6mo ago
And this is how it looks like:
No description
ἔρως
ἔρως•6mo ago
you didnt specify the font-weight the font is for instead of starting the path with ../, use /
GeorgeDash
GeorgeDashOP•6mo ago
OK, thanks! And also - hi again! Yaaaay, it worked! 😁
ἔρως
ἔρως•6mo ago
awesome! remember: for css, the paths are relative to the file location so, you would have to either use / at the beginning or use ../fonts/....otf instead the best is the / because it will always use the root as a starting point, and you dont need to fix paths if you move the css file to another folder
GeorgeDash
GeorgeDashOP•6mo ago
I see - I didn't know that only / will make it use the root as the start point. Thanks for the tip!
ἔρως
ἔρως•6mo ago
you're welcome

Did you find this page helpful?