1

I have a pretty typical font setup: in my creative-exchange theme folder, I placed some custom font files and I reference my fonts like so:

@font-face {
    font-family: "Graphik";
    font-style: normal;
    font-weight: 400;
    src: url("fonts/Graphik-Regular-Web.woff2") format('woff2');
}

However, when I go to Experience Editor, I see the browser is trying to fetch the font but is getting a 500 error. I already have my theme setup via SXA-cli, so it should have uploaded the fonts. I also tried directly adding the fonts to the content editor, but that didn't help either. What am I doing wrong?

1
  • Could you post the details of the 500 error you are getting? And also are you using the SXA asset optimizer? Mar 22 at 19:04
0

The problem is that the fonts directory of your local theme just isn’t anywhere in the config to be watched or uploaded. So, open up the gulp/config.js and add 'fonts/**/.' to one of the sections:

enter image description here

Source :: https://citizensitecore.com/2021/08/11/custom-fonts-not-uploading-to-sxa-theme/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.