Allow Custom Font files to be referenced from Themes folder

Hi all
As a part of creating my starter template in a dev environment, I wanted to locally host and serve custom fonts. For the same, I used the Bricks Child Theme, then created an assets/fonts folder inside the child theme:
/wp-content/themes/bricks-child/assets/fonts/
Font file was copied to fonts folder inside the child theme (via FTP) and are available at
http://localhost:8080/wp-content/themes/bricks-child/assets/fonts/noto_LEx_Dev_regular.woff2

Now when trying to add the custom font in the Bricks Settings:

  1. Added New Font: myFont1
  2. Added New variant: 400 regulat > Edit> Woff2 file: pasted the URL - http://localhost:8080/wp-content/themes/bricks-child/assets/fonts/noto_LEx_Dev_regular.woff2
  3. Close variant dropdown and Published the custom font
    However, the font variant is not showing up and is missing

Is there a way to allow inclusion of custom fonts not in media library but in child-theme > assets ?

Thanks
Vivek

2 Likes