IIS Adding Support for Font Families

By default IIS doesn’t support all of the font family types used in CSS. Additional media support entries may be required.

Below is a typical font family definition, as used within a CSS file.

@font-face {font-family: 'my-font';src:
    url(inc/fonts/my-font.otf) format('truetype'),
    url(inc/fonts/my-font.eot) format('eot'),
    url(inc/fonts/my-font.woff) format('woff');}

Whilst configuring a website hosted on Windows server I found that Internet Explorer wasn’t adopting the specified font family.

I checked the HTML and CSS on a Linux server with Apache. All was well and Internet Explorer was showing the correct font, confirming that my definitions were correct, no spelling errors or missing characters.

Using Firebug on Firefox I was able to see that the woff file was being requested but not downloaded.

By adding the media type for woff to IIS I was able to resolve this problem.

Add font Media Type

Font media types are added to IIS as per any media type.

IIS adding font familiy support

From within the IIS manager select the server root in the left menu to show its home menu, with options for IIS, management and not shown in this view, ASP.NET, FTP.

IIS adding font familiy support mime types

Click on the MIME Types, within the IIS section to show a list of those configured.

IIS adding font familiy support add mime type

At the top right corner click on Add.

IIS adding font familiy support add mime type woff

To add a new MIME type enter the extension and the MIME type within the Add MIME Type popup window:

IIS adding font familiy support mime types includes woff

The addition of the woff font added to the list of installed MIME Types.

IIS Media Types

The table below gives the media types for the common font types

Extension Media Type
.eot application/vnd.ms-fontobject
.ttf application/octet-stream
.otf application/font-sfnt
.svg image/svg+xml
.woff application/font-woff
.woff2 application/font-woff2

Looking at the IIS mime support for the font types I observed the following default font support:

Media Type Extension Configured by default
TrueType .ttf Yes
Embedded OpenType .eot Yes
OpenType .otf No
Web Open Font Format .woff No