Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make this Google Font work on Internet Explorer 11

I use Montserrat font on my website, but it doesn't display on IE11 (windows 7). I put this other question some days ago: Montserrat font isn't displayed on IE 10 and 11

Now i am trying to add Montserrat google font throught the css but it doesn't seems to work. This is my code:

@font-face {
    font-family: 'Montserrat';
    src: url('assets/fonts/montserrat-regular-webfont.eot');
    src: url('assets/fonts/montserrat-regular-webfont.eot?#iefix') format('embedded-opentype'),
         url('assets/fonts/montserrat-regular-webfont.woff2') format('woff2'),
         url('assets/fonts/montserrat-regular-webfont.woff') format('woff'),
         url('assets/fonts/montserrat-regular-webfont.ttf') format('truetype'),
         url('assets/fonts/montserrat-regular-webfont.svg#montserratregular') format('svg');
    font-weight: normal;
    font-style: normal;

}
like image 256
ThemesCreator Avatar asked Nov 04 '14 09:11

ThemesCreator


People also ask

How do I add a font to Internet Explorer?

Open Internet Explorer, select the Tools button and select Internet options. Select the General tab, and then, under Appearance, select Fonts. Select the fonts you want to use, select OK, and then select OK again.

Do Google fonts work on all devices?

Sometimes, fonts encounter display errors on different operating systems and devices. Google has introduced a high-speed content delivery network (CDN) that allows all major browsers to support their fonts without any cross-platform issues.

Can all Google fonts be used for web?

Any CSS feature that can be applied to text on the web works well with all kinds of fonts – web fonts, local fonts, and system fonts.


1 Answers

Use:

@import url(http://fonts.googleapis.com/css?family=Montserrat:400,700);

To call it inside your stylesheet and:

font-family: 'Montserrat', sans-serif;

To make something that font..

From google fonts: "Note: For best display in IE, make the stylesheet tag the first element in the HTML section. In IE, if the link is placed after tags, the entire page will block and not display anything until the font is loaded."

<link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>

If that does not work, try this: https://developers.google.com/fonts/docs/webfont_loader#Example

This will make every browser "behave like Firefox".

like image 93
Refilon Avatar answered Nov 15 '22 21:11

Refilon