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


PHP mPDF::_charDefined方法代碼示例

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


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

示例1: foreach

 foreach ($unicode_ranges as $urk => $ur) {
     if ($urk >= $urgp * $ningroup && $urk < ($urgp + 1) * $ningroup) {
         if ($ur['pua'] || $ur['reserved'] || $ur['control']) {
             $html .= '<td style="background-color: #000000;"></td>';
         } else {
             $rangekey = $urk;
             $range = $ur['range'];
             $rangestart = $ur['starthex'];
             $rangeend = $ur['endhex'];
             $rangestartdec = $ur['startdec'];
             $rangeenddec = $ur['enddec'];
             $uniinrange = 0;
             $fontinrange = 0;
             for ($i = $rangestartdec; $i <= $rangeenddec; $i++) {
                 //if (isset($cw[$i])) { $fontinrange++; }
                 if ($mpdf->_charDefined($cw, $i)) {
                     $fontinrange++;
                 }
                 if (isset($unichars[$i])) {
                     $uniinrange++;
                 }
             }
             if ($uniinrange) {
                 if ($fontinrange) {
                     $pc = $fontinrange / $uniinrange;
                     $str = '(' . $fontinrange . '/' . $uniinrange . ')';
                     if ($pc == 1) {
                         $fullcovers[$urk][] = $fname;
                         $html .= '<td style="background-color: #00FF00;"></td>';
                     } else {
                         if ($pc > 1) {
開發者ID:kuwox,項目名稱:buenavista,代碼行數:31,代碼來源:font_coverage.php

示例2: if

	   if ($urk >= ($urgp*$ningroup) && $urk < (($urgp+1)*$ningroup)) {
	    if ($ur['pua'] || $ur['reserved'] || $ur['control']) {
		$html .= '<td style="background-color: #000000;"></td>'; 
	    }
	    else {
		$rangekey = $urk;
		$range = $ur['range'];
		$rangestart = $ur['starthex'];
		$rangeend = $ur['endhex'];
		$rangestartdec = $ur['startdec'];
		$rangeenddec = $ur['enddec'];
		$uniinrange = 0;
		$fontinrange = 0;
		for ($i=$rangestartdec; $i<=$rangeenddec; $i++) {
			//if (isset($cw[$i])) { $fontinrange++; }
			if ($mpdf->_charDefined($cw, $i)) { $fontinrange++; }
			if (isset($unichars[$i])) { $uniinrange++; }
		}
		if ($uniinrange) {
			if ($fontinrange) {
				$pc = ($fontinrange/$uniinrange);
				$str = '('.$fontinrange.'/'.$uniinrange.')';
				if ($pc==1) { 
					$fullcovers[$urk][] = $fname;
					$html .= '<td style="background-color: #00FF00;"></td>'; 
				}
				else if ($pc>1) { 
					$fullcovers[$urk][] = $fname;
					$html .= '<td style="background-color: #00FF00;">'.$str.'</td>'; 
				}
				else if ($pc>=0.9) { 
開發者ID:rromerouchiha,項目名稱:quinielas,代碼行數:31,代碼來源:font_coverage.php

示例3: strtoupper

// create HTML content
$html .= '<table cellpadding="2" cellspacing="0" style="font-family:' . $font . ';text-align:center; border-collapse: collapse; ">';
$html .= '<tr><td colspan="18" style="font-family:helvetica;font-weight:bold">' . strtoupper($font) . '</td></tr>';
$html .= '<tr><td colspan="18" style="font-family:helvetica;font-size:8pt;font-weight:bold">' . strtoupper($range) . ' (U+' . $rangestart . '-U+' . $rangeend . ')</td></tr>';
$html .= '<tr><td></td>';
$html .= '<td></td>';
for ($i = 0; $i < 16; $i++) {
    $html .= '<td><b>-' . sprintf('%X', $i) . '</b></td>';
}
// print each character
for ($i = 32; $i < $max; ++$i) {
    if ($i > 0 and $i % 16 == 0) {
        $notthisline = true;
        while ($notthisline) {
            for ($j = 0; $j < 16; $j++) {
                if ($mpdf->_charDefined($cw, $i + $j)) {
                    //if (isset($cw[($i+$j)])) {
                    $notthisline = false;
                }
            }
            if ($notthisline) {
                if ($showmissing) {
                    $range = '';
                    foreach ($unicode_ranges as $urk => $ur) {
                        if ($i >= $ur['startdec'] && $i <= $ur['enddec']) {
                            $rangekey = $urk;
                            $range = $ur['range'];
                            $rangestart = $ur['starthex'];
                            $rangeend = $ur['endhex'];
                            break;
                        }
開發者ID:Lexinek,項目名稱:mpdf-replace,代碼行數:31,代碼來源:font_dump.php

示例4:

    $html .= '<tr><td colspan="18" style="font-family:helvetica;font-size:8pt;font-weight:bold">'.strtoupper($range).' (U+'.$rangestart .'-U+'.$rangeend.')</td></tr>';
    $html .= '<tr><td></td>';

    $html .= '<td></td>';
    for ($i = 0; $i < 16; $i++) {
            $html .= '<td><b>-'.sprintf('%X', $i).'</b></td>';
    }


    // print each character
    for ($i = 32; $i < $max; ++$i) {
        if (($i > 0) AND (($i % 16) == 0)) {
		$notthisline = true;
		while($notthisline) {
	    	   for ($j = 0; $j < 16; $j++) {
			if ($mpdf->_charDefined($cw, ($i + $j))) {
			//if (isset($cw[($i+$j)])) { 
				$notthisline = false; 
			}
		   }
		   if ($notthisline) { 
		    if ($showmissing) {
			$range = '';
	    		foreach($unicode_ranges AS $urk => $ur) {
				if ($i >= $ur['startdec'] && $i <= $ur['enddec']) {
					$rangekey = $urk;
					$range = $ur['range'];
					$rangestart = $ur['starthex'];
					$rangeend = $ur['endhex'];
					break;
				}
開發者ID:rromerouchiha,項目名稱:quinielas,代碼行數:31,代碼來源:font_dump.php


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