convertFont(file_get_contents(ANYFONT_FONTDIR."/".$font)); file_put_contents(ANYFONT_FONTDIR."/{$fontname}.eot", $files["eot"]); file_put_contents(ANYFONT_FONTDIR."/{$fontname}.woff", $files["woff"]); $files["svg"] !== false ? file_put_contents(ANYFONT_FONTDIR."/{$fontname}.svg", $files["svg"]) : 0; $response = array( "success" => true, "msg" => sprintf(__("%s was successfully processed and can now be used with '@font-face' CSS styles.", 'anyfont'), $font) ); break; case "cufon": preg_match("/http\:\/\/(\w+\.\w+\.?\w?\w?\w?)/", get_option('siteurl'), $domain); file_put_contents(ANYFONT_FONTDIR."/$fontname.js", $server->convertCufon(file_get_contents(ANYFONT_FONTDIR."/".$font), $domain[1])); while(!file_exists(ANYFONT_FONTDIR."/$fontname.js")){ sleep(); } $response = array( "success" => true, "msg" => sprintf(__("%s was successfully processed and can now be used with Cufon Styles.", 'anyfont'), $font) ); break; } } catch (fontservException $e) { $response = array( "success" => false, "msg" => $e->getMessage() ); } ?>