Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Font file not found

Avatar

Level 2

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.

1 Accepted Solution

Avatar

Correct answer by
Level 2

I put font file in clientlib -  resource folder.

It worked.

Thank you.

View solution in original post

3 Replies

Avatar

Level 10

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

Avatar

Correct answer by
Level 2

I put font file in clientlib -  resource folder.

It worked.

Thank you.

Avatar

Level 1

I moved the font file into the clientlib's resource folder, and now it's functioning perfectly.

Appreciate the assistance!

 

DGME Login Employee