1, CURLOPT_HEADER => 1, CURLOPT_VERBOSE => 1, CURLOPT_URL => $url, CURLOPT_USERAGENT => $ua )); ; if (($response = curl_exec($curl))) { $header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE); $header = substr($response, 0, $header_size); if (strrpos($header, 'Content-Type: text/css')) { return $response; } } } function parseCss($css) { $fonts = array(); $fontName = null; $url = null; foreach (preg_split('/\r\n|\n|\r/', $css) as $cssLine) { // We save the font-family name for EOT if (strpos($cssLine, 'font-family')) { preg_match("/'(.*?)'/i", $cssLine, $data); $fontName = $data[1]; } if (strpos($cssLine, 'url')) { preg_match('/local\((.*?)\)/i', $cssLine, $data); if (count($data)) { $fontName = str_replace('\'', '', $data[1]); } } if (strpos($cssLine, 'src')) { preg_match('/url\((.*?)\)/i', $cssLine, $data); $url = $data[1]; } if ($fontName !== null && $url !== null) { $fonts[$fontName] = $url; $fontName = null; $url = null; } } return $fonts; } if (isset($_POST['url'])) { $urlParts = parse_url($_POST['url']); parse_str($urlParts['query'], $queryParts); $gFontURL .= urlencode($queryParts['family']); $fontsDownloadLinks = array(); foreach ($fontTypes as $fontType) { $content = curlGoogleFont($gFontURL, getUA($fontType)); $fontsDownloadLinks[$fontType] = parseCss($content); } } ?>

Thanks for visiting. Please provide your Google Fonts URL to import in your CSS (example: http://fonts.googleapis.com/css?family=Cabin:500,700,500italic,700italic) and you will get links for download fonts.

Google Fonts URL:

$links) { ?> Not found

' : ''; ?> $link) { ?>

Contact | Download code