Closed marcosfromrio closed 4 years ago
I'm having the same issue when using relative paths. The files in /_next/static/media, aren't actually font files, but are instead JS files that export the font files from /_next/static/chunks. The solution to get around this is to use Next's built-in static file service
@flakesrc : Please can you test the new version 1.1.0 and report. Thanks -RR
This should be fixed now. Please see https://next-fonts-local-example.now.sh/ for a live demo
Please upgrade next-fonts package to 1.1.0. Thanks -RR
Works perfectly!
I added
next-fonts
to be able to insert filesystem fonts into my scss file, but the style is not being applied.Here is a print of the font being loaded: https://i.imgur.com/eiQWPp0.png
Here is my code that applies the style:
Here is the font definition code:
Here is a print of the font being applied normally: https://i.imgur.com/Z7YsxhH.png
And here a print of the titles (h1, h2...) without the Ubuntu font style: https://i.imgur.com/JBrBk46.png
I had a problem before, and it was because I was adding
format
here:url(". / .....") format ("ttf")
now i remove and add this for test both but none of this works.
The sass code:
the font original path is changed, ut this apply the new path in a
style
tag too:PS: when i add the google font link the style is applied normally