Internet Explorer @font-face is failing

前端 未结 15 1328
甜味超标
甜味超标 2020-11-27 18:07

I\'m trying to get Internet Explorer to render my pretty fonts. It\'s not working. They work fine in Firefox and I can see in my Apache access logs that IE has pulled the fo

相关标签:
15条回答
  • 2020-11-27 19:06

    The best definition for font-face is:

    @font-face {
      font-family: 'Graublau Web';
      src: url('GraublauWeb.eot?') format('eot'), url('GraublauWeb.woff') format('woff'), url('GraublauWeb.ttf') format('truetype');
    }
    
    0 讨论(0)
  • 2020-11-27 19:07

    It's always better to direct the font-face attribute locally and not online, e.g. url('../fonts/font-name.eot'). IE and other browsers won't "see" the fonts when you are running your webpage on a local server.

    0 讨论(0)
  • 2020-11-27 19:09

    I had the same issues many folks here encountered. The issue turned out to be simply that IE has a shorter character limit on the value of font-family. I gave my font-family a shorter name and it finally worked using the css that font squirrel spit out.

    Weird one!

    0 讨论(0)
提交回复
热议问题