Jan 29, 2010

Using @font-face on Windows Server IIS 6.0

This is a very small article but hopefully will save some hassle for some people. I found to use OpenType fonts on a Windows server in IIS you actually have to add .otf as a MIME type in IIS 6.0. To do that Open IIS –> Right click on “Web Sites” –> Click on Properties –> HTTP Headers Tab –> MIME Types (at the bottom of the window) –> New. For the extension type .otf and for the MIME type put “font/otf” without the quotes. It should look like the image below.

 

 

Then you just set the CSS like

@font-face {
  font-family: CoolFont;
  src: url(/Fonts/CoolFont.otf) format("opentype");
}

this works in basically everything from IE6-8, Firefox 3.5+, Safari 3.1+, Opera and Google Chrome (but only svg fonts)

image

By FreedomChicken



Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | stopping spam