當前位置: 首頁>>代碼示例>>PHP>>正文


PHP TCPDF_FONTS::UniArrSubString方法代碼示例

本文整理匯總了PHP中TCPDF_FONTS::UniArrSubString方法的典型用法代碼示例。如果您正苦於以下問題:PHP TCPDF_FONTS::UniArrSubString方法的具體用法?PHP TCPDF_FONTS::UniArrSubString怎麽用?PHP TCPDF_FONTS::UniArrSubString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TCPDF_FONTS的用法示例。


在下文中一共展示了TCPDF_FONTS::UniArrSubString方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Write


//.........這裏部分代碼省略.........
     // character position
     $j = 0;
     // current starting position
     $sep = -1;
     // position of the last blank space
     $shy = false;
     // true if the last blank is a soft hypen (SHY)
     $l = 0;
     // current string length
     $nl = 0;
     //number of lines
     $linebreak = false;
     $pc = 0;
     // previous character
     // for each character
     while ($i < $nb) {
         if ($maxh > 0 and $this->y >= $maxy) {
             break;
         }
         //Get the current character
         $c = $chars[$i];
         if ($c == 10) {
             // 10 = "\n" = new line
             //Explicit line break
             if ($align == 'J') {
                 if ($this->rtl) {
                     $talign = 'R';
                 } else {
                     $talign = 'L';
                 }
             } else {
                 $talign = $align;
             }
             $tmpstr = TCPDF_FONTS::UniArrSubString($uchars, $j, $i);
             if ($firstline) {
                 $startx = $this->x;
                 $tmparr = array_slice($chars, $j, $i - $j);
                 if ($rtlmode) {
                     $tmparr = TCPDF_FONTS::utf8Bidi($tmparr, $tmpstr, $this->tmprtl, $this->isunicode, $this->CurrentFont);
                 }
                 $linew = $this->GetArrStringWidth($tmparr);
                 unset($tmparr);
                 if ($this->rtl) {
                     $this->endlinex = $startx - $linew;
                 } else {
                     $this->endlinex = $startx + $linew;
                 }
                 $w = $linew;
                 $tmpcellpadding = $this->cell_padding;
                 if ($maxh == 0) {
                     $this->SetCellPadding(0);
                 }
             }
             if ($firstblock and $this->isRTLTextDir()) {
                 $tmpstr = $this->stringRightTrim($tmpstr);
             }
             // Skip newlines at the begining of a page or column
             if (!empty($tmpstr) or $this->y < $this->PageBreakTrigger - $row_height) {
                 $this->Cell($w, $h, $tmpstr, 0, 1, $talign, $fill, $link, $stretch);
             }
             unset($tmpstr);
             if ($firstline) {
                 $this->cell_padding = $tmpcellpadding;
                 return TCPDF_FONTS::UniArrSubString($uchars, $i);
             }
             ++$nl;
開發者ID:TheTypoMaster,項目名稱:myapps,代碼行數:67,代碼來源:tcpdf.php


注:本文中的TCPDF_FONTS::UniArrSubString方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。