Ejemplo n.º 1
0
    include _MPDF_PATH . 'classes/ttfontsuni.php';
}
$ttf = new TTFontFile();
$tempfontdata = array();
$tempsansfonts = array();
$tempseriffonts = array();
$tempmonofonts = array();
$tempfonttrans = array();
$ff = scandir($ttfdir);
foreach ($ff as $f) {
    $ret = array();
    $isTTC = false;
    if (strtolower(substr($f, -4, 4)) == '.ttc' || strtolower(substr($f, -5, 5)) == '.ttcf') {
        // Mac ttcf
        $isTTC = true;
        $ttf->getTTCFonts($ttfdir . $f);
        $nf = $ttf->numTTCFonts;
        for ($i = 1; $i <= $nf; $i++) {
            $ret[] = $ttf->extractCoreInfo($ttfdir . $f, $i);
        }
    } else {
        if (strtolower(substr($f, -4, 4)) == '.ttf' || strtolower(substr($f, -4, 4)) == '.otf') {
            $ret[] = $ttf->extractCoreInfo($ttfdir . $f);
        }
    }
    for ($i = 0; $i < count($ret); $i++) {
        if (!is_array($ret[$i])) {
            if (!$pdf) {
                echo $ret[$i] . '<br />';
            }
        } else {