Server IP : 103.233.192.212 / Your IP : 18.117.73.187 Web Server : Apache/2 System : Linux sv1.inde.co.th 3.10.0-1160.36.2.el7.x86_64 #1 SMP Wed Jul 21 11:57:15 UTC 2021 x86_64 User : sumpatuan ( 1058) PHP Version : 5.5.38 Disable Function : symlink,shell_exec,exec,proc_close,proc_open,popen,system,dl,putenv,passthru,escapeshellarg,escapeshellcmd,pcntl_exec,proc_get_status,proc_nice,proc_terminate,pclose,ini_alter,virtual,openlog,ini_restore MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/sumpatuan/domains/sumpatuan.go.th/MPDF54/utils/ |
Upload File : |
<?php /* This script prints out details of any TrueType collection font files in your font directory. Files ending wih .otc are examined. Point your browser to http://your.domain/your_path_to _mpdf/utils/font_collections.php By default this will examine the folder /ttfonts/ (or the default font directory defined by _MPDF_TTFONTPATH. You can optionally define an alternative folder to examine by setting the variable below (must be a relative path, or filesystem path): */ $checkdir = ''; ////////////////////////////////// ////////////////////////////////// ////////////////////////////////// ini_set("memory_limit","256M"); define('_MPDF_PATH','../'); include("../mpdf.php"); $mpdf=new mPDF(''); if ($checkdir) { $ttfdir = $checkdir; } else { $ttfdir = _MPDF_TTFONTPATH; } $mqr=ini_get("magic_quotes_runtime"); if ($mqr) { set_magic_quotes_runtime(0); } if (!class_exists('TTFontFile', false)) { include(_MPDF_PATH .'classes/ttfontsuni.php'); } $ttf = new TTFontFile(); $ff = scandir($ttfdir); echo '<h3>Font collection files found in '.$ttfdir.' directory</h3>'; foreach($ff AS $f) { $ret = array(); if (strtolower(substr($f,-4,4))=='.ttc' || strtolower(substr($f,-4,4))=='.ttcf') { // Mac ttcf $ttf->getTTCFonts($ttfdir.$f); $nf = $ttf->numTTCFonts; echo '<p>Font collection file ('.$f.') contains the following fonts:</p>'; for ($i=1; $i<=$nf; $i++) { $ret = $ttf->extractCoreInfo($ttfdir.$f, $i); $tfname = $ret[0]; $bold = $ret[1]; $italic = $ret[2]; $fname = strtolower($tfname ); $fname = preg_replace('/[ ()]/','',$fname ); $style = ''; if ($bold) { $style .= 'Bold'; } if ($italic) { $style .= 'Italic'; } if (!$style) { $style = 'Regular'; } echo '<div>['.$i.'] '.$tfname.' ('.$fname.') '.$style.'</div>'; } echo '<hr />'; } } exit; ?>