simpleTables = true; //============================================================== // This generates a .mtx.php file if not already generated $mpdf->SetFont($family,$style); //============================================================== //============================================================== //============================================================== //============================================================== $ff = array(); $ffs = ''; if ($lang && $script) { $GSUBFeatures = $mpdf->CurrentFont['GSUBFeatures'][$script][$lang]; if (is_array($GSUBFeatures)) { foreach($GSUBFeatures AS $tag=>$v) { $ff[] = '"'.$tag.'" 0'; } } $GPOSFeatures = $mpdf->CurrentFont['GPOSFeatures'][$script][$lang]; if (is_array($GPOSFeatures )) { foreach($GPOSFeatures AS $tag=>$v) { $ff[] = '"'.$tag.'" 0'; } } $ffs = implode(', ',$ff); } //============================================================== $html = '

'.strtoupper($family.$style).'

'; if ($lang && $script) { $html .= '

'.$script.' '.$lang.'

'; } $mpdf->WriteHTML($html); //============================================================== //============================================================== //============================================================== //============================================================== $mpdf->debugfonts = false; $family = strtolower($family); $style=strtoupper($style); if($style=='IB') $style='BI'; $fontkey = $family.$style; $stylekey = $style; if (!$style) { $stylekey = 'R'; } //============================================================== $mpdf->overrideOTLsettings[$fontkey]['script'] = $script; $mpdf->overrideOTLsettings[$fontkey]['lang'] = $lang; //============================================================== //include(_MPDF_TTFONTDATAPATH.$fontkey.'.mtx.php'); $ttffile = ''; if (defined('_MPDF_SYSTEM_TTFONTS')) { $ttffile = _MPDF_SYSTEM_TTFONTS.$mpdf->fontdata[$family][$stylekey]; if (!file_exists($ttffile)) { $ttffile = ''; } } if (!$ttffile) { $ttffile = _MPDF_TTFONTPATH.$mpdf->fontdata[$family][$stylekey]; if (!file_exists($ttffile)) { die("mPDF Error - cannot find TTF TrueType font file - ".$ttffile); } } $ttfstat = stat($ttffile); if (isset($mpdf->fontdata[$family]['TTCfontID'][$stylekey])) { $TTCfontID = $mpdf->fontdata[$family]['TTCfontID'][$stylekey]; } else { $TTCfontID = 0; } $BMPonly = false; if (in_array($family,$mpdf->BMPonly)) { $BMPonly = true; } $useOTL = $mpdf->fontdata[$family]['useOTL']; include(_MPDF_PATH .'classes/otl_dump.php'); $ttf = new OTLdump($mpdf); $mpdf->OTLscript = $script; $mpdf->OTLlang = $lang; //============================================================== //============================================================== //============================================================== //============================================================== //============================================================== //============================================================== if($lang && $script) { $ttf->getMetrics($ttffile, $fontkey, $TTCfontID, $mpdf->debugfonts, $BMPonly, true, $useOTL, 'detail'); } //============================================================== //============================================================== //============================================================== //============================================================== else { // IF lang and script not defined $ttf->getMetrics($ttffile, $fontkey, $TTCfontID, $mpdf->debugfonts, $BMPonly, true, $useOTL, 'summary'); } //============================================================== //============================================================== //============================================================== //============================================================== //============================================================== //============================================================== $mpdf->Output(); exit; //============================================================== //============================================================== //============================================================== //============================================================== ?>