I was looking for the correct MIME-type for opentype fonts. I did some research, and it turns out there is no MIME-type for fonts. After looking at some solutions I chose font/otf.
So there is no official MIME-type for .otf files. Actually there is no type for truetype fonts either. On the internet, several suggestions have been made. Here is a summary of the most popular ones and why I didn't chose them.
application/octet-stream
This one actually exists. Every unknown type should be served as application/octet-stream. This includes fonts. This is not a nice solution however, since you can only tell that it is a font by the extension.
application/x-font
This one is better. It fails at one important point though: there is no difference between opentype and truetype fonts.
application/opentype
This one is not descriptive, you don't know this is a font, but you can make a distinction between opentype and truetype.
font/opentype
This is great! You know it's a font, and you know it's opentype! This is also consistent with existing MIME-types. Images have types like image/png, audio has types like audio/mpg etc., so it's logical a font has a type in the form of font/x. There is however an even better solution.
font/otf
This looks very similar to font/opentype, but it uses otf instead of opentype. Why is this better? Because of consistency. Images use types like image/png and image/jpeg. Notice that the name is not spelled out: image/png instead of image/portable-network-graphic. I therefore chose font/otf. The truetype equivalent would be font/ttf. EOT and WOFF would be font/eot and font/woff respectively, but for EOT there actually is a correct MIME-type: vnd.ms-fontobject.





