From 5828c0d80580cbad069988e2067ad5e37e1e98e7 Mon Sep 17 00:00:00 2001 From: nicolaasuni Date: Fri, 15 Apr 2011 11:47:17 +0200 Subject: [PATCH] 5.9.068 --- tcpdf.php | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/tcpdf.php b/tcpdf.php index d9d7642..fe723c1 100755 --- a/tcpdf.php +++ b/tcpdf.php @@ -4891,8 +4891,22 @@ class TCPDF { } } ++$this->numfonts; + if ($type == 'core') { + $name = $this->CoreFonts[$fontkey]; + $subset = false; + } elseif (($type == 'TrueType') OR ($type == 'Type1')) { + $subset = false; + } elseif ($type == 'TrueTypeUnicode') { + $enc = 'Identity-H'; + } elseif ($type != 'cidfont0') { + $this->Error('Unknow font type: '.$type.''); + } + // set name if unset + if (!isset($name) OR empty($name)) { + $name = $fontkey; + } // create artificial font style variations if missing (only works with non-embedded fonts) - if ($missing_style) { + if (($type != 'core') AND $missing_style) { // style variations $styles = array('' => '', 'B' => ',Bold', 'I' => ',Italic', 'BI' => ',BoldItalic'); $name .= $styles[$bistyle]; @@ -4918,16 +4932,6 @@ class TCPDF { } } } - if ($type == 'core') { - $name = $this->CoreFonts[$fontkey]; - $subset = false; - } elseif (($type == 'TrueType') OR ($type == 'Type1')) { - $subset = false; - } elseif ($type == 'TrueTypeUnicode') { - $enc = 'Identity-H'; - } elseif ($type != 'cidfont0') { - $this->Error('Unknow font type: '.$type.''); - } // initialize subsetchars to contain default ASCII values (0-255) $subsetchars = array_fill(0, 256, true); $this->setFontBuffer($fontkey, array('fontkey' => $fontkey, 'i' => $this->numfonts, 'type' => $type, 'name' => $name, 'desc' => $desc, 'up' => $up, 'ut' => $ut, 'cw' => $cw, 'dw' => $dw, 'enc' => $enc, 'cidinfo' => $cidinfo, 'file' => $file, 'ctg' => $ctg, 'subset' => $subset, 'subsetchars' => $subsetchars));