Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

@font-face not working on a client site?

This is CSS code

@font-face {
    font-family: 'FuturaStdBook';
    src: url('site/font-face/futurastd-medium-webfont.eot');
    src: local('☺'), url('site/font-face/futurastd-medium-webfont.woff') format('woff'), url('site/font-face/futurastd-medium-webfont.ttf') format('truetype'), url('site/font-face/futurastd-medium-webfont.svg#webfont') format('svg');
    font-weight: normal;
    font-style: normal;
}

h2 {font-family:'FuturaStdBook', sans-serif}

Can it be related to mime type?

How can i ensure my path is right?

like image 365
Jitendra Vyas Avatar asked Apr 26 '10 14:04

Jitendra Vyas


1 Answers

If you're using IIS, you'll need to register a MIME type for the .eot extension.

  1. In IIS Manager, in the IIS section, open the MIME Types configuration
  2. Under "Actions", click "Add..."
  3. Enter .otf in the extension box, and application/octet-stream in the MIME type box.
  4. Click OK

You'll need to do this for each non-standard extension you use (.ttf is already registered, .woff is not), but that should do it!

like image 112
Daniel Schaffer Avatar answered Sep 28 '22 07:09

Daniel Schaffer