From ef5495a2320c51c2f9c372a4a4c38dd4c9fe7534 Mon Sep 17 00:00:00 2001 From: Anders Munk Date: Fri, 2 Jan 2015 12:07:49 +0100 Subject: [PATCH] Made the system work without trying to do stuff with font format-files. Unit test is passing --- src/CssEmbed/CssEmbed.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/CssEmbed/CssEmbed.php b/src/CssEmbed/CssEmbed.php index 91895c3..3ea66dd 100644 --- a/src/CssEmbed/CssEmbed.php +++ b/src/CssEmbed/CssEmbed.php @@ -73,6 +73,12 @@ protected function replace($matches) */ protected function embedFile($file) { + // Check for various weird formats which the system is unable to handle. Perhaps there is a better way at some point? + if (substr($file, -4) == '.eot' || substr($file, -4) == '.ttf' || substr($file, -5) == '.woff') + { + return; + } + return sprintf(self::URI_PATTERN, $this->mimeType($file), $this->base64($file)); }