I’m trying to implement a font that I’ve added to the project inside my public folder. It works beautifully with local (client side) only. But when a device accesses it from the server, the font doesn’t show (it defaults to times Roman).
I do understand why this happens, but I’m just looking for a way to export it so other devices adopt that particular font. How can I do that?
I haven’t unfortunately And it must be a silly query because i posted it into StackOverflow, and got 2 downvotes… I mean if it’s silly, then point me to the right direction please!
When I run my app through localhost, the font renders on my machine; I get the font appearing corrrectly, but if another device (say another computer in the same network) accesses my app using my I.P, the font does not render in that machine but rather defaults back to Times Roman.
Your code look fine, so it should work. The reason it would work on localhost and not remotely is probably because you have the font installed on that computer, so the browser uses the system version rather than a webfont.
Does the font request show up in the network panel of dev tools?
When you inspect the element and look at computed properties (in chrome), what does it say at the bottom under ‘Rendered Fonts’?
Maybe convert the ttf to a woff and see if the browser picks it up?