| @@ -13,33 +13,31 @@ | ||
| 13 | 13 | |
| 14 | 14 | |
| 15 | 15 | $font = 'dejavusanscondensed'; // Use internal mPDF font-name |
| 16 | 16 | |
| 17 | -$min = 0x0020; // Minimum Unicode value to show | |
| 18 | -$max = 0x2FFFF; // Maximum Unicode value to show | |
| 17 | +$showmissing = true; // Show all missing unicode blocks / characters | |
| 19 | 18 | |
| 20 | -$showmissing = false; // Show all missing unicode blocks / characters | |
| 21 | 19 | |
| 22 | - | |
| 23 | 20 | ////////////////////////////////// |
| 24 | 21 | ////////////////////////////////// |
| 25 | 22 | ////////////////////////////////// |
| 26 | 23 | |
| 27 | 24 | set_time_limit(600); |
| 28 | -ini_set("memory_limit","512M"); | |
| 25 | +ini_set("memory_limit","256M"); | |
| 29 | 26 | |
| 30 | 27 | //============================================================== |
| 31 | 28 | //============================================================== |
| 29 | +define('_MPDF_URI', '../'); | |
| 32 | 30 | include("../mpdf.php"); |
| 33 | 31 | |
| 34 | 32 | $mpdf=new mPDF(''); |
| 33 | +$mpdf->StartProgressBarOutput(2); | |
| 35 | 34 | |
| 36 | 35 | $mpdf->SetDisplayMode('fullpage'); |
| 37 | 36 | |
| 38 | -$mpdf->useSubstitutions = true; | |
| 37 | +$mpdf->useSubstitutions = false; | |
| 38 | +$mpdf->debug = true; | |
| 39 | 39 | $mpdf->simpleTables = true; |
| 40 | -// force fonts to be embedded whole i.e. NOT susbet | |
| 41 | -$mpdf->percentSubset = 0; | |
| 42 | 40 | |
| 43 | 41 | //============================================================== |
| 44 | 42 | //============================================================== |
| 45 | 43 | //============================================================== |
| @@ -79,12 +77,12 @@ | ||
| 79 | 77 | |
| 80 | 78 | include(_MPDF_TTFONTDATAPATH.$font.'.mtx.php'); |
| 81 | 79 | |
| 82 | 80 | if ($smp) { |
| 83 | - $max = min($max,131071); | |
| 81 | + $max = 131071; | |
| 84 | 82 | } |
| 85 | 83 | else { |
| 86 | - $max = min($max,65535); | |
| 84 | + $max = 65535; | |
| 87 | 85 | } |
| 88 | 86 | |
| 89 | 87 | |
| 90 | 88 | $justfinishedblank = false; |
| @@ -101,10 +99,10 @@ | ||
| 101 | 99 | } |
| 102 | 100 | $lastrange = $range ; |
| 103 | 101 | // create HTML content |
| 104 | 102 | $html .= '<table cellpadding="2" cellspacing="0" style="font-family:'.$font.';text-align:center; border-collapse: collapse; ">'; |
| 105 | - $html .= '<tr><td colspan="18" style="font-family:dejavusanscondensed;font-weight:bold">'.strtoupper($font).'</td></tr>'; | |
| 106 | - $html .= '<tr><td colspan="18" style="font-family:dejavusanscondensed;font-size:8pt;font-weight:bold">'.strtoupper($range).' (U+'.$rangestart .'-U+'.$rangeend.')</td></tr>'; | |
| 103 | + $html .= '<tr><td colspan="18" style="font-family:helvetica;font-weight:bold">'.strtoupper($font).'</td></tr>'; | |
| 104 | + $html .= '<tr><td colspan="18" style="font-family:helvetica;font-size:8pt;font-weight:bold">'.strtoupper($range).' (U+'.$rangestart .'-U+'.$rangeend.')</td></tr>'; | |
| 107 | 105 | $html .= '<tr><td></td>'; |
| 108 | 106 | |
| 109 | 107 | $html .= '<td></td>'; |
| 110 | 108 | for ($i = 0; $i < 16; $i++) { |
| @@ -112,9 +110,9 @@ | ||
| 112 | 110 | } |
| 113 | 111 | |
| 114 | 112 | |
| 115 | 113 | // print each character |
| 116 | - for ($i = $min; $i <= $max; ++$i) { | |
| 114 | + for ($i = 32; $i < $max; ++$i) { | |
| 117 | 115 | if (($i > 0) AND (($i % 16) == 0)) { |
| 118 | 116 | $notthisline = true; |
| 119 | 117 | while($notthisline) { |
| 120 | 118 | for ($j = 0; $j < 16; $j++) { |
| @@ -154,9 +152,9 @@ | ||
| 154 | 152 | else if($range) { |
| 155 | 153 | $html .= '</tr></table><br />'; |
| 156 | 154 | $mpdf->WriteHTML($html); $html = ''; |
| 157 | 155 | $html .= '<table cellpadding="2" cellspacing="0" style="font-family:'.$font.';text-align:center; border-collapse: collapse; ">'; |
| 158 | - $html .= '<tr><td colspan="18" style="font-family:dejavusanscondensed;font-size:8pt;font-weight:bold">'.strtoupper($range).' (U+'.$rangestart.'-U+'.$rangeend.')</td></tr>'; | |
| 156 | + $html .= '<tr><td colspan="18" style="font-family:helvetica;font-size:8pt;font-weight:bold">'.strtoupper($range).' (U+'.$rangestart.'-U+'.$rangeend.')</td></tr>'; | |
| 159 | 157 | $html .= '<tr><td></td>'; |
| 160 | 158 | $html .= '<td></td>'; |
| 161 | 159 | for ($k = 0; $k < 16; $k++) { |
| 162 | 160 | $html .= '<td><b>-'.sprintf('%X', $k).'</b></td>'; |
| @@ -183,9 +181,9 @@ | ||
| 183 | 181 | if ($i > 0 && ($i % 16) == 0 && ($range != $lastrange)) { |
| 184 | 182 | $html .= '</tr></table><br />'; |
| 185 | 183 | $mpdf->WriteHTML($html); $html = ''; |
| 186 | 184 | $html .= '<table cellpadding="2" cellspacing="0" style="font-family:'.$font.';text-align:center; border-collapse: collapse; ">'; |
| 187 | - $html .= '<tr><td colspan="18" style="font-family:dejavusanscondensed;font-size:8pt;font-weight:bold">'.strtoupper($range).' (U+'.$rangestart.'-U+'.$rangeend.')</td></tr>'; | |
| 185 | + $html .= '<tr><td colspan="18" style="font-family:helvetica;font-size:8pt;font-weight:bold">'.strtoupper($range).' (U+'.$rangestart.'-U+'.$rangeend.')</td></tr>'; | |
| 188 | 186 | $html .= '<tr><td></td>'; |
| 189 | 187 | $html .= '<td></td>'; |
| 190 | 188 | for ($k = 0; $k < 16; $k++) { |
| 191 | 189 | $html .= '<td><b>-'.sprintf('%X', $k).'</b></td>'; |
| @@ -196,16 +194,11 @@ | ||
| 196 | 194 | $justfinishedblankinvalid = false; |
| 197 | 195 | $html .= '</tr><tr><td><i>'.(floor($i / 16)*16).'</i></td>'; |
| 198 | 196 | $html .= '<td><b>'.sprintf('%03X', floor($i / 16)).'-</b></td>'; |
| 199 | 197 | } |
| 200 | - | |
| 201 | - // Add dotted circle to any character (mark) with width=0 | |
| 202 | - if ($mpdf->_charDefined($cw, $i) && _getCharWidth($cw, $i)==0) { $html .= '<td>◌&#'.$i.';</td>'; $counter++; } | |
| 203 | - else { | |
| 204 | - if ($mpdf->_charDefined($cw, $i)) { $html .= '<td>&#'.$i.';</td>'; $counter++; } | |
| 205 | - else if (isset($unichars[$i])) { $html .= '<td style="background-color: #FFAAAA;"></td>'; } | |
| 206 | - else { $html .= '<td style="background-color: #555555;"></td>'; } | |
| 207 | - } | |
| 198 | + if ($mpdf->_charDefined($cw, $i)) { $html .= '<td>&#'.$i.';</td>'; $counter++; } | |
| 199 | + else if (isset($unichars[$i])) { $html .= '<td style="background-color: #FFAAAA;"></td>'; } | |
| 200 | + else { $html .= '<td style="background-color: #555555;"></td>'; } | |
| 208 | 201 | } |
| 209 | 202 | |
| 210 | 203 | if (($i % 16) > 0) { |
| 211 | 204 | for ($j = ($i % 16); $j < 16; ++$j) { $html .= '<td style="background-color: #555555;"></td>'; } |
| @@ -211,16 +204,8 @@ | ||
| 211 | 204 | for ($j = ($i % 16); $j < 16; ++$j) { $html .= '<td style="background-color: #555555;"></td>'; } |
| 212 | 205 | } |
| 213 | 206 | $html .= '</tr></table><br />'; |
| 214 | 207 | //============================================================== |
| 215 | -function _getCharWidth(&$cw, $u, $isdef=true) { | |
| 216 | - if ($u==0) { $w = false; } | |
| 217 | - else { $w = (ord($cw[$u*2]) << 8) + ord($cw[$u*2+1]); } | |
| 218 | - if ($w == 65535) { return 0; } | |
| 219 | - else if ($w) { return $w; } | |
| 220 | - else if ($isdef) { return false; } | |
| 221 | - else { return 0; } | |
| 222 | -} | |
| 223 | 208 | //============================================================== |
| 224 | 209 | $mpdf->WriteHTML($html); // Separate Paragraphs defined by font |
| 225 | 210 | |
| 226 | 211 | $mpdf->Output(); |