How add custom font in in project

Avatar

Avatar

sagrawal

Avatar

sagrawal

sagrawal

19-09-2020

How to add font files  in project folder. I create fonts folder but not getting an option of copying font file or even file drag an drop option. 


 
fonts.PNG

 

 

Please guide me how to add font files.

View Entire Topic

Avatar

Avatar

raj_mandalapu

Avatar

raj_mandalapu

raj_mandalapu

19-09-2020

First, the location of the fonts folder which you placed needs to change, you need to place your fonts under the resources folder, the resource folder should be under clientlibs

You can refer weretail:

 
 

temp.png

Sample code:

  font-family: SlatePro-Bk;

  src: url("../resources/fonts/we-icons.1.0.0.woff") format("woff");

}

you can either use the Maven project to import fonts files to AEM or a temporary solution is export clientlib as package and add font files then import it to AEM.