Search code examples
cssinternet-explorerfontsfont-facewebfonts

Render font in in IE 8 and below (working in all other browsers)


I can't make IE 8 and below (need preferably upto IE 6) render a font I have on my server.

The code I'm using is the following:

@font-face { 
    font-family:omnes; 
    src:url('fonts/Omnes-Regular.eot') format('eot'), 
        url('fonts/Omnes-Regular.otf') format('otf'),
        url('fonts/Omnes-Regular.ttf') format('truetype');
}

This seems to work for all other browsers, how can I approach this?

You can see a live demo here:

http://trufavarela.com/uruware/


Solution

  • Try this:

    @font-face {
        font-family: 'omnes';
        src: url('fonts/Omnes-Regular.eot');
        src: url('fonts/Omnes-Regular.eot?#iefix') format('embedded-opentype'),
             url('fonts/Omnes-Regular.ttf') format('truetype');
    }
    

    You probably do not need otf file format. This code is likely to work, because when IE tries getting anything other, than the eot format, the ? simply makes it think the rest of the string is a parameter, as in a php file.

    Also, you should probably include woff and svg formats of the font as well. And use Font Squirrel, does all the job for you.