Correct Apache AddType directives for font MIME types

I realize that this question is old, but for anyone looking for a quick copy/paste for adding font MIME types to their .htaccess: <IfModule mod_mime.c> AddType application/vnd.ms-fontobject .eot AddType application/x-font-opentype .otf AddType image/svg+xml .svg AddType application/x-font-ttf .ttf AddType application/font-woff .woff AddType application/font-woff2 .woff2 </IfModule>

Proper MIME type for .woff2 fonts

In IIS you can declare the mime type for WOFF2 font files by adding the following to your project’s web.config: <system.webServer> <staticContent> <remove fileExtension=”.woff2″ /> <mimeMap fileExtension=”.woff2″ mimeType=”font/woff2″ /> </staticContent> </system.webServer> Update: The mime type may be changing according to the latest W3C Editor’s Draft WOFF2 spec. See Appendix A: Internet Media Type Registration section … Read more

Mime type for WOFF fonts?

Update from Keith Shaw’s comment on Jun 22, 2017: As of February 2017, RFC8081 is the proposed standard. It defines a top-level media type for fonts, therefore the standard media type for WOFF and WOFF2 are as follows: font/woff font/woff2 In January 2011 it was announced that in the meantime Chromium will recognize application/x-font-woff as … Read more

Are eot, ttf, and svg still necessary in the font-face declaration?

October 2018 edit tl;dr: use WOFF2, every modern browser supports it, with WOFF fallback because IE11 just won’t bloody die (update: it finally got an EOL date of June 15, 2022), and without the local() source indicator, because you want everyone to use the same font, not “a different version or even completely different font … Read more