My custom font doesn't want to work in Internet Explorer

前端 未结 1 1874
予麋鹿
予麋鹿 2020-12-14 02:58

I\'m trying to use the Green Pillow and Cotidiana fonts on a site I\'m working on. I\'ve loaded the .eot file using @font-face but it\'s still not working...

Really

相关标签:
1条回答
  • 2020-12-14 03:15

    You might try the following syntax, known as the bulletproof font-face syntax:

    @font-face {
        font-family: 'MyFontFamily';
        src: url('myfont-webfont.eot?#iefix') format('embedded-opentype'), 
             url('myfont-webfont.woff') format('woff'), 
             url('myfont-webfont.ttf')  format('truetype'),
             url('myfont-webfont.svg#svgFontName') format('svg');
        }
    

    Apparently the querystring after the .eot font helps IE not choke. If you don't have .svg or .woff versions of your fonts, just remove those lines.

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