public static function compassInlineFontFiles($file)
{
$args = func_get_args();
$files = array();
$mimes = array('otf' => 'font.opentype', 'ttf' => 'font.truetype', 'woff' => 'font.woff', 'off' => 'font.openfont');
while (count($args)) {
$path = self::compassResolvePath(array_shift($args));
$data = base64_encode(file_get_contents($path));
$format = array_shift($args);
$ext = array_pop(explode('.', $file));
if (isset($mimes[$ext])) {
$mime = $mimes[$ext];
} else {
continue;
}
$files[] = "url('data:{$mime};base64,{$data}') format('{$format}')";
}
return new SassString(implode(', ', $files));
}