Font file not found

purvesh47 05-03-2019

Hello,

I'm trying to apply custom fonts to my component.

My ttf file location : /apps/<project Name>/fonts/fontFile.ttf

And  Error is :

http://localhost:4502/etc.clientlibs<ProjetName>/clientlibs/clientlib-site/components/teaserpromo/styles/Pacifico.ttf net::ERR_ABORTED 404 (Not Found)

So I'm not getting actual path for font file.

Correct me if i'm wrong.

Thanks for help.

Answers (1)

Answers (1)

gauravb41175071
MVP
05-03-2019

check We-retail/WKND project for how/where fonts are stored.

Move fonts under clientlibs so that you don't require a 'proxy' and simply use relative path to fonts folder in your less file.

change

/apps/<project Name>/fonts/fontFile.ttf  to /apps/<project Name>clientlibs/...../fonts/fontFile.ttf 

check  - Custom Fonts in AEM Sites