+ $l = array('a_meta_charset' => strtoupper($lang['encoding']),
+ 'a_meta_dir' => @$lang['rtl'] ? 'rtl' : 'ltr',
+ 'a_meta_language' => $code, 'w_page' => 'page');
+
+ if (!isset($l['a_meta_charset']))
+ $l = array('a_meta_charset' => 'ISO-8859-1', 'a_meta_dir' => 'ltr', 'a_meta_language' => 'en_GB', 'w_page' => 'page');
+ $enc = $l['a_meta_charset'];
+ $uni = ($enc == 'UTF-8' || $enc == 'GB2312' ? true : false);
+ if ($uni)
+ ini_set("memory_limit", "48M");
+
+ $this->isunicode = $uni;
+ $this->setLanguageArray($l);
+ if ($uni)
+ {
+ global $unicode, $unicode_mirror, $unicode_arlet, $laa_array, $diacritics;
+ include_once(dirname(__FILE__)."/unicode_data2.php");
+ }
+ $this->encoding = strtoupper($lang['encoding']);
+
+ $this->FontFamily = 'helvetica';
+ $this->FontStyle = '';
+ $this->FontSizePt = 12;
+// $this->utf8Bidi(array(""));
+ }
+
+
+ // $fontname should be a standard PDF font (like 'times', 'helvetica' or 'courier')
+ // or one that's been installed on your system. An empty string can also be used
+ // which will retain the font currently in use.
+ // $style is either:
+ // * a special case string:
+ // * bold
+ // * italic
+ // * or a case-insensitive string where each char represents a style choice
+ // and you can use more than one or none at all. Possible choices:
+ // * empty string: regular
+ // * B: bold
+ // * I: italic
+ // * U: underline
+ // * D: line trough (aka "strike through")
+ function selectFont($fontname, $style = '')