From 4188f38ad56d7ba2ea46e94403f305243514f80c Mon Sep 17 00:00:00 2001 From: tcit Date: Thu, 24 Jul 2014 15:49:36 +0200 Subject: add pdf and mobi libraries --- .../libraries/mpdf/utils/font_collections.php | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 inc/3rdparty/libraries/mpdf/utils/font_collections.php (limited to 'inc/3rdparty/libraries/mpdf/utils/font_collections.php') diff --git a/inc/3rdparty/libraries/mpdf/utils/font_collections.php b/inc/3rdparty/libraries/mpdf/utils/font_collections.php new file mode 100644 index 00000000..20f387ef --- /dev/null +++ b/inc/3rdparty/libraries/mpdf/utils/font_collections.php @@ -0,0 +1,72 @@ +Font collection files found in '.$ttfdir.' directory'; +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 '

Font collection file ('.$f.') contains the following fonts:

'; + 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 '
['.$i.'] '.$tfname.' ('.$fname.') '.$style.'
'; + + } + echo '
'; + } +} + + +exit; + +?> \ No newline at end of file -- cgit v1.2.3