How to make Google Fonts work in IE?

后端 未结 11 770
抹茶落季
抹茶落季 2020-11-28 03:17

I\'ve been developing a site that uses the Google Fonts API. It\'s great, and supposedly has been tested in IE, but when testing in IE 8 the fonts simply don\'t get styled.<

11条回答
  •  天命终不由人
    2020-11-28 03:37

    You can try fontsforweb.com where fonts are working for all browsers, because they are provided in TTF, WOFF and EOT formats together with CSS code ready to be pasted on your page i.e.

    @font-face{ 
        font-family: "gothambold1";
        src: url('http://fontsforweb.com/public/fonts/5903/gothambold1.eot');
        src: local("Gotham-Bold"), url('http://fontsforweb.com/public/fonts/5903/gothambold1.woff') format("woff"), url('http://fontsforweb.com/public/fonts/5903/gothambold1.ttf') format("truetype");
    }
    .fontsforweb_fontid_5903 {
        font-family: "gothambold1";
    }
    

    or you can download them zipped in a package with CSS file attached

    then just add class to any element to apply that font i.e.

    This will be written with Gotham Bold font and will work in all browsers

    See it working: http://jsfiddle.net/SD4MP/

提交回复
热议问题