Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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;
}
like image 908
Michał Urban Avatar asked Oct 10 '13 06:10

Michał Urban


1 Answers

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!!!

like image 103
Arnol Avatar answered Sep 21 '22 05:09

Arnol