Fix #8070 - merging in svgtopdf stuff
[pear] / Fpdf / Chinese.php
index 3be672e..a59302b 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-require_once 'Fpdf/tFPDF.php';
+require_once ('FPDF.php');
 
 $GLOBALS['UTF8']=array(' '=>250,'!'=>300,'"'=>410,'#'=>668,'$'=>490,'%'=>875,'&'=>700,'\''=>250,
        '('=>240,')'=>240,'*'=>417,'+'=>667,','=>250,'-'=>313,'.'=>250,'/'=>520,'0'=>550,'1'=>500,
@@ -34,7 +34,7 @@ $GLOBALS['GB_widths']=array(' '=>207,'!'=>270,'"'=>342,'#'=>467,'$'=>462,'%'=>79
        'n'=>527,'o'=>524,'p'=>524,'q'=>504,'r'=>338,'s'=>336,'t'=>277,'u'=>517,'v'=>450,'w'=>652,
        'x'=>466,'y'=>452,'z'=>407,'{'=>370,'|'=>258,'}'=>370,'~'=>605);
 
-class FPDF_Chinese extends tFPDF
+class PDF_Chinese extends FPDF
 {
 function AddCIDFont($family,$style,$name,$cw,$CMap,$registry)
 {
@@ -112,10 +112,6 @@ function GetMBStringWidth($s)
                $c=$s[$i];
                if(ord($c)<128)
                {
-                       if (!isset($cw[$c])) {
-                               $cw[$c] = 240;//print_R($cw);exit;
-                       }
-                       
                        $l+=$cw[$c];
                        $i++;
                }
@@ -333,7 +329,8 @@ function _putfonts()
                $this->_out('<</Type /Encoding /BaseEncoding /WinAnsiEncoding /Differences ['.$diff.']>>');
                $this->_out('endobj');
        }
-        
+       $mqr=get_magic_quotes_runtime();
+       //set_magic_quotes_runtime(0);
        foreach($this->FontFiles as $file=>$info)
        {
                //Font file embedding
@@ -356,7 +353,8 @@ function _putfonts()
                fclose($f);
                $this->_out('endobj');
        }
-       foreach($this->fonts as $k=>$font)
+//     set_magic_quotes_runtime($mqr);
+       foreach($this->fonts as $k=>$font)
        {
                //Font objects
                $this->_newobj();