Clientlibs not loading the fonts when placed in apps | Community
Skip to main content
April 30, 2018
Solved

Clientlibs not loading the fonts when placed in apps

  • April 30, 2018
  • 12 replies
  • 12456 views

We have included the fonts using below syntax

@font-face {

  font-family: SlatePro-Bk;

  src: url("../css/fonts/SlatePro-Bk.woff") format("woff");

}

Font file is placed in apps/{project-folder}/clientlibs/{client-libraryfolder}/css/fonts/SlatePro-Bk.woff.

Fonts are not loaded it gives 404 error when the clientlib is rendered from apps using allowproxy= true. It is working fine when we move the clientlibraries to /etc/clientlibs.

Is this expected ? If yes, Do we have any other way to include the fonts/images in the clientlibrary?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by wimsymonsvrt

No I don't prajwalreddy​. I was trying to get Adobe staff to tell us something useful. But it appears smacdonald2008​ also dodged the question . But if I read https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/clientlibs.html#LocatingaClientLibraryFolderandUsingtheProxyClientLibrariesServlet and https://github.com/Adobe-Marketing-Cloud/aem-project-archetype/issues/63#issuecomment-334400884, you should place your font in a "resources" subdirectory.

12 replies

Karl515
January 26, 2019

For those who are still wondering. Just place your fonts under resources folder with clientlibs allowed proxy and you should be fine. It works for me. cheers!

March 3, 2022

So for those wondering, a 'resources directory' is just a directory called resources, which sits inside your clientlibs folder along with your /js and /css folders

 

/apps/my-app/clientlibs/my-app-lib/resources

 

Tested this on 6.5 and it works. Kinda weird behaviour but OK AEM you do you