[SOLVED] How can I add my fonts to hanami app?

I added “selawkl.ttf” font into

apps/web/assets/fonts

folder.
But, I recieved next error after page load:

HTTP/1.1 GET 404 127.0.0.1 /fonts/selawkl.ttf

How can I add “selawkl” font to Hanami app?

I moved my fonts folder to “public” path and this fixed my problem.

@milovidov It used to return a 404 because you used /fonts/selawkl.ttf instead of /assets/selawkl.ttf. What happens if you move back it to apps/web/assets/fonts and you’ll do the request with the URL that I suggested? Thank you.

This is not usefull for me. I use bootstrap, and fonts are requeried by url /fonst/selawkl.ttf. But, is there a way for routing /fonts/selawkl.ttf to assets/selawkl.ttf?

@milovidov Oh I see. I personally patch local versions of these UI frameworks to match Hanami expected URLs. But it’s fine to have the solution that you found. Thanks.