From 03386911234b0920311fc9a303da62e8d115fd29 Mon Sep 17 00:00:00 2001 From: Daniel Jagszent Date: Thu, 18 Jun 2015 17:02:34 +0200 Subject: [PATCH] add MIME type for .woff2 extension Add the MIME type for .woff2 files so that `inline_font_files` can also handle the newer WOFF2 font format. Also changed the MIME type off .woff files from `application/font-woff` to the more concise `font/woff` (see https://gist.github.com/sergejmueller/cf6b4f2133bcb3e2f64a ) --- .../compass/core/sass_extensions/functions/inline_image.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/lib/compass/core/sass_extensions/functions/inline_image.rb b/core/lib/compass/core/sass_extensions/functions/inline_image.rb index e8baa36c08..4ab7d09572 100644 --- a/core/lib/compass/core/sass_extensions/functions/inline_image.rb +++ b/core/lib/compass/core/sass_extensions/functions/inline_image.rb @@ -43,7 +43,9 @@ def compute_mime_type(path, mime_type = nil) when /\.ttf$/i 'font/truetype' when /\.woff$/i - 'application/font-woff' + 'font/woff' + when /\.woff2$/i + 'font/woff2' when /\.off$/i 'font/openfont' when /\.([a-zA-Z]+)$/