Michał Urban
Michał Urban

Reputation: 505

Rendering Open Sans font in IE

I've got a problem with rendering Open Sans font in IE10. Font is rendered correctly in Chrome and Firefox. In IE text is rendered by default font. I've downloaded font from Google Fonts (http://www.google.com/fonts/specimen/Open+Sans). Here is CSS code:

@font-face {
    font-family: 'Open Sans';
    src: url('fonts/OpenSans-Regular.ttf');
    font-weight: normal;
}

@font-face {
    font-family: 'Open Sans';
    src: url('fonts/OpenSans-Bold.ttf');
    font-weight: bold;
}

Upvotes: 5

Views: 11140

Answers (1)

Arnol
Arnol

Reputation: 91

Seems IE not working with .ttf font file, you can try to convert the .ttf to .eot using converter (you can google it 'converter .ttf to .eot'), upload it to your font folder and then try to use something like this :

@font-face {
font-family: OpenSans-Bold;
src: url('fonts/OpenSans-Bold.eot'); /* IE */
src: local("OpenSans-Bold"), url('fonts/OpenSans-Bold.ttf') format("truetype"); /* non-IE */}

@font-face {
font-family: OpenSans-Regular;
src: url('fonts/OpenSans-Regular.eot'); /* IE */
src: local("OpenSans-Regular;"), url('fonts/OpenSans-Regular.ttf') format("truetype"); /* non-IE */}

I have tried it, and it's working. Good Luck!!!

Upvotes: 9

Related Questions