Font-display

I want to add a font-display tag to the fonts in the CSS - the theme calls a “awsome” font, and it slows down my site

Hello @masel1951,

Thanks for writing in!

You can check out this links to know more about font display tag;

Hope this helps.

I know how to add the font-display tag. The question is how to insert the tag in “x-generated-css”,

The style id=“x-generated-css” calls font awesome, but I do not know how to modify x-generated css.

I tried adding the following to the global CSS,

@font-face {
font-family: ‘FontAwesome’;
font-display: swap;
}

That did not work.

Hello @masel1951,

You cannot modify “x-generated-css” because it is the theme’s stylesheet. We do not even recommend that you modify it. If you are going to have a custom css and insert the Font Awesome, you will just have to insert your custom css in your child theme’s style.css instead. You can do that by going to Appearance > Editor. And please make sure that you have properly set up Font Awesome. It would be best that you check out his link:
https://fontawesome.com/start

Hope this helps.

Is there some way to avoid calling font-awsome for icons. I have two cart icons, and the entire font awesome loads - it takesover 1 second accfording to google.

Hello @masel1951,

Regretfully you cannot unload it because it is in the “x-generated-css”. Unloading it would mean modification of the file which we do not recommend. For faster performance of your site, please check out this article instead: https://theme.co/apex/forum/t/customizations-performance/210

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.