font face not workibg for IE8 ?? getting @font-fac

2019-09-01 01:19发布

问题:

I am using font face to include a customised font named razing. The font is not working in IE8 but works well on IE9+ and other browsers. I checked the console in IE8 browser and i found " @font-face encountered unknown error." I tried using svg and fixes like ?#iefix but it ain't working. Please can u provide a healthy solution to overcome this, Thanks !!

    <style>
      @font-face {
      font-family: Razing;
      src: url(Fonts/Razing/razing.eot);
      src: url(Fonts/Razing/razing.eot?#iefix) ,
     url(Fonts/Razing/razing.ttf),
     url(Fonts/Razing/razing.woff),
     url(Fonts/Razing/razing.svg) format('svg');

      }
    .ABC{ font-family:Razing;font-size:20px;  }
    </style>

 <p class="ABC"></p>

回答1:

Try something like this may helps

@font-face {
    font-family: 'dinpromedium';
    src: url('Fonts/Razing/razing.eot');
    src: url('Fonts/Razing/razing.eot?#iefix') format('embedded-opentype'),
         url('Fonts/Razing/razing.woff') format('woff'),
         url('Fonts/Razing/razing.ttf') format('truetype'),
         url('Fonts/Razing/razing.svg#dinpromedium') format('svg');
    font-weight: normal;
    font-style: normal;

}