Search code examples
cssasp.net-mvc-4fontsfont-face

Font ttf file not working with IE


Im playing around with a site and ttf fonts, but for somereason the font does not want to work in IE.

The css is simple and it works with chrome, but not IE.

@font-face 
{
font-family: 'CAROBTN';



src: url('fonts/CAROBTN_.ttf');



}

Any ideas?

The simple play site is Digi notes


Solution

  • Some IE versions don't play nicely with ttf, see here:

    What is the status of TTF support in Internet Explorer?

    You will likely need a .eot fallback:

    @font-face 
    {
    font-family: 'CAROBTN';
    
    src: url('fonts/CAROBTN_.ttf'),
         url('fonts/CAROBTN_.eot');
    
    }
    

    You can convert font files here: https://www.fontsquirrel.com/tools/webfont-generator