@font-face display problem

Hi there!

I’m using custom fonts on one site via @font-face, the code used in pro child theme is:

@font-face {
font-family: ‘EvelethCleanRegular’;
src: url(’//mydomain.com/fonts/EvelethCleanRegular.eot’);
src: url(’//mydomain.com/fonts/EvelethCleanRegular.woff2’) format(‘woff2’),
url(’//mydomain.com/fonts/EvelethCleanRegular.woff’) format(‘woff’),
url(’//mydomain.com/fonts/EvelethCleanRegular.ttf’) format(‘truetype’),
url(’//mydomain.com/fonts/EvelethCleanRegular.svg#EvelethCleanRegular’) format(‘svg’),
url(’//mydomain.com/fonts/EvelethCleanRegular.eot?#iefix’) format(‘embedded-opentype’);
font-weight: normal;
font-style: normal;
}

This works perfectly on Safair, Chrome and even on IE, but in firefox don’t, is there a way to fix this?

Hello There,

Thanks for posting in! You are experiencing CORS issue. To resolve this, please have your code updated and use this instead:

@font-face {
  font-family: 'EvelethCleanRegular';
  src: url('//efectobam.com/fonts/EvelethCleanRegular.eot');
  src: url('//www.efectobam.com/fonts/EvelethCleanRegular.woff2') format('woff2'),
       url('//www.efectobam.com/fonts/EvelethCleanRegular.woff') format('woff'),
       url('//www.efectobam.com/fonts/EvelethCleanRegular.ttf') format('truetype'),
       url('//www.efectobam.com/fonts/EvelethCleanRegular.svg#EvelethCleanRegular') format('svg'),
       url('//www.efectobam.com/fonts/EvelethCleanRegular.eot?#iefix') format('embedded-opentype');
  font-weight: normal;
  font-style: normal;
}

Hope this helps. Please let us know how it goes.

Hello @RueNel

That worked! Thanks!

You’re welcome :slight_smile:

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