예제 #1
0
 function get_text_width($text, $font, $size, $word_spacing = 0, $char_spacing = 0)
 {
     $this->_pdf->selectFont($font);
     if (!DOMPDF_UNICODE_ENABLED) {
         $text = mb_convert_encoding($text, 'Windows-1252', 'UTF-8');
     }
     return $this->_pdf->getTextWidth($size, $text, $word_spacing, $char_spacing);
 }
예제 #2
0
 function get_text_width($text, $font, $size, $spacing = 0)
 {
     $this->_pdf->selectFont($font);
     $ascii = utf8_decode($text);
     //     // Hack for  
     //     $ascii = str_replace("\xA0", " ", $ascii);
     return $this->_pdf->getTextWidth($size, $ascii, $spacing);
 }
 function get_text_width($text, $font, $size, $word_spacing = 0, $char_spacing = 0)
 {
     $this->_pdf->selectFont($font);
     $unicode = $this->_dompdf->get_option("enable_unicode");
     if (!$unicode) {
         $text = mb_convert_encoding($text, 'Windows-1252', 'UTF-8');
     }
     return $this->_pdf->getTextWidth($size, $text, $word_spacing, $char_spacing);
 }
예제 #4
0
 public function measureText($text)
 {
     if (self::DEBUG) {
         echo __FUNCTION__ . "\n";
     }
     $style = $this->getStyle();
     $this->getFont($style->fontFamily, $style->fontStyle);
     return $this->canvas->getTextWidth($this->getStyle()->fontSize, $text);
 }
 function get_text_width($text, $font, $size, $spacing = 0)
 {
     $this->_pdf->selectFont($font);
     return $this->_pdf->getTextWidth($size, utf8_decode($text), $spacing);
 }
예제 #6
0
파일: CPDF.php 프로젝트: onyxnz/quartzpos
 function get_text_width($text, $font, $size, $word_spacing = 0, $char_spacing = 0)
 {
     $this->_pdf->selectFont($font);
     return $this->_pdf->getTextWidth($size, $text, $word_spacing, $char_spacing);
 }