font-face with wrong MIME type in Chrome

As usual, different browsers have different needs. Here is a cross browser @fontface declaration, taken from the Paul Irish blog

@font-face {
  font-family: 'Graublau Web';
  src: url('GraublauWeb.eot');
  src: local('☺'),
         url('GraublauWeb.woff') format('woff'), url('GraublauWeb.ttf') format('truetype');
}

.eot is for IE, the rest of the browsers use either .woff or .ttf
If you need to generate the different types from the source font, you can use Font Squirrel’s font-face generator

You also need to an .htaccess to the location of the fonts adding the following types:

AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/x-font-woff .woff

Leave a Comment