32
1
mirror of https://github.com/vdm-io/tcpdf.git synced 2024-11-29 07:33:54 +00:00
This commit is contained in:
nicolaasuni 2011-04-15 11:47:17 +02:00
parent b52780fe62
commit 5828c0d805

View File

@ -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));