local fonts can't resolve
Answered
Saltwater Crocodile posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Saltwater CrocodileOP
I don't get how to type a correct path for local fonts. They are in the 'public/fonts'. It can resolve if fonts are in the same folder as layout.tsx, plus it can be resolved if path would be: '../public/fonts/myFont.woff2'. But I dont understand why I cant get them with default public path, like: '/fonts/myFont.woff2' or at least '@/public/fonts/myFont.woff2'
![Image](https://cdn.discordapp.com/attachments/1194235636077563945/1194235636371169320/image.png?ex=65af9d9b&is=659d289b&hm=9a013a018e214fddd66cea6680875da2dd6b59f63a2e3dcf7fd56a56b31e4800&)
![Image](https://cdn.discordapp.com/attachments/1194235636077563945/1194235636610256968/image.png?ex=65af9d9b&is=659d289b&hm=c3d2b796d3cf3792a9cd5056065e2901f92346629c92d4220faf61a0b24ae107&)
9 Replies
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
try changing the path to
/public/fonts/xxxx
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Saltwater CrocodileOP
![Image](https://cdn.discordapp.com/attachments/1194235636077563945/1194236173741195334/image.png?ex=65af9e1b&is=659d291b&hm=c45b6680f32e1fda8241e70ac807e0aef1ff52dcdc0b2ee3a7283feb9feff83b&)
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
oh should be
../public/fonts/xxx
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Saltwater CrocodileOP
yea, it works if I set by default way, but i dont understand why it doesnt work like static asset public folder
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
because it is expecting the relative path of the font and will copy the font to static assets folder when building
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
so you dont need to put them in the public folder
Answer
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Saltwater CrocodileOP
thank you man for explanation. now i get it
![Avatar](https://cdn.discordapp.com/avatars/743561772069421169/3c5d689eee4459a24fc420063411c016.webp?size=256)
Ray
no prob