Ejemplo n.º 1
0
 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) {
Ejemplo n.º 2
0
	   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) { 
Ejemplo n.º 3
0
// 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;
                        }
Ejemplo n.º 4
0
    $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;
				}