Parses the raw binary table data. Throws an exception if the table is malformed.
151 $actualLength = strlen($cmapData);
152 if ($actualLength != 262) {
153 #require_once 'Zend/Pdf/Exception.php'; 162 #require_once 'Zend/Pdf/Exception.php'; 168 if ($length != $actualLength) {
169 #require_once 'Zend/Pdf/Exception.php'; 170 throw new Zend_Pdf_Exception(
"Table length ($length) does not match actual length ($actualLength)",
180 if ($language != 0) {
189 $this->_glyphIndexArray[0x00] = ord($cmapData[
$i++]);
190 $this->_glyphIndexArray[0x01] = ord($cmapData[
$i++]);
191 $this->_glyphIndexArray[0x02] = ord($cmapData[
$i++]);
192 $this->_glyphIndexArray[0x03] = ord($cmapData[
$i++]);
193 $this->_glyphIndexArray[0x04] = ord($cmapData[
$i++]);
194 $this->_glyphIndexArray[0x05] = ord($cmapData[
$i++]);
195 $this->_glyphIndexArray[0x06] = ord($cmapData[
$i++]);
196 $this->_glyphIndexArray[0x07] = ord($cmapData[
$i++]);
197 $this->_glyphIndexArray[0x08] = ord($cmapData[
$i++]);
198 $this->_glyphIndexArray[0x09] = ord($cmapData[
$i++]);
199 $this->_glyphIndexArray[0x0a] = ord($cmapData[
$i++]);
200 $this->_glyphIndexArray[0x0b] = ord($cmapData[
$i++]);
201 $this->_glyphIndexArray[0x0c] = ord($cmapData[
$i++]);
202 $this->_glyphIndexArray[0x0d] = ord($cmapData[
$i++]);
203 $this->_glyphIndexArray[0x0e] = ord($cmapData[
$i++]);
204 $this->_glyphIndexArray[0x0f] = ord($cmapData[
$i++]);
205 $this->_glyphIndexArray[0x10] = ord($cmapData[
$i++]);
206 $this->_glyphIndexArray[0x11] = ord($cmapData[
$i++]);
207 $this->_glyphIndexArray[0x12] = ord($cmapData[
$i++]);
208 $this->_glyphIndexArray[0x13] = ord($cmapData[
$i++]);
209 $this->_glyphIndexArray[0x14] = ord($cmapData[
$i++]);
210 $this->_glyphIndexArray[0x15] = ord($cmapData[
$i++]);
211 $this->_glyphIndexArray[0x16] = ord($cmapData[
$i++]);
212 $this->_glyphIndexArray[0x17] = ord($cmapData[
$i++]);
213 $this->_glyphIndexArray[0x18] = ord($cmapData[
$i++]);
214 $this->_glyphIndexArray[0x19] = ord($cmapData[
$i++]);
215 $this->_glyphIndexArray[0x1a] = ord($cmapData[
$i++]);
216 $this->_glyphIndexArray[0x1b] = ord($cmapData[
$i++]);
217 $this->_glyphIndexArray[0x1c] = ord($cmapData[
$i++]);
218 $this->_glyphIndexArray[0x1d] = ord($cmapData[
$i++]);
219 $this->_glyphIndexArray[0x1e] = ord($cmapData[
$i++]);
220 $this->_glyphIndexArray[0x1f] = ord($cmapData[
$i++]);
221 $this->_glyphIndexArray[0x20] = ord($cmapData[
$i++]);
222 $this->_glyphIndexArray[0x21] = ord($cmapData[
$i++]);
223 $this->_glyphIndexArray[0x22] = ord($cmapData[
$i++]);
224 $this->_glyphIndexArray[0x23] = ord($cmapData[
$i++]);
225 $this->_glyphIndexArray[0x24] = ord($cmapData[
$i++]);
226 $this->_glyphIndexArray[0x25] = ord($cmapData[
$i++]);
227 $this->_glyphIndexArray[0x26] = ord($cmapData[
$i++]);
228 $this->_glyphIndexArray[0x27] = ord($cmapData[
$i++]);
229 $this->_glyphIndexArray[0x28] = ord($cmapData[
$i++]);
230 $this->_glyphIndexArray[0x29] = ord($cmapData[
$i++]);
231 $this->_glyphIndexArray[0x2a] = ord($cmapData[
$i++]);
232 $this->_glyphIndexArray[0x2b] = ord($cmapData[
$i++]);
233 $this->_glyphIndexArray[0x2c] = ord($cmapData[
$i++]);
234 $this->_glyphIndexArray[0x2d] = ord($cmapData[
$i++]);
235 $this->_glyphIndexArray[0x2e] = ord($cmapData[
$i++]);
236 $this->_glyphIndexArray[0x2f] = ord($cmapData[
$i++]);
237 $this->_glyphIndexArray[0x30] = ord($cmapData[
$i++]);
238 $this->_glyphIndexArray[0x31] = ord($cmapData[
$i++]);
239 $this->_glyphIndexArray[0x32] = ord($cmapData[
$i++]);
240 $this->_glyphIndexArray[0x33] = ord($cmapData[
$i++]);
241 $this->_glyphIndexArray[0x34] = ord($cmapData[
$i++]);
242 $this->_glyphIndexArray[0x35] = ord($cmapData[
$i++]);
243 $this->_glyphIndexArray[0x36] = ord($cmapData[
$i++]);
244 $this->_glyphIndexArray[0x37] = ord($cmapData[
$i++]);
245 $this->_glyphIndexArray[0x38] = ord($cmapData[
$i++]);
246 $this->_glyphIndexArray[0x39] = ord($cmapData[
$i++]);
247 $this->_glyphIndexArray[0x3a] = ord($cmapData[
$i++]);
248 $this->_glyphIndexArray[0x3b] = ord($cmapData[
$i++]);
249 $this->_glyphIndexArray[0x3c] = ord($cmapData[
$i++]);
250 $this->_glyphIndexArray[0x3d] = ord($cmapData[
$i++]);
251 $this->_glyphIndexArray[0x3e] = ord($cmapData[
$i++]);
252 $this->_glyphIndexArray[0x3f] = ord($cmapData[
$i++]);
253 $this->_glyphIndexArray[0x40] = ord($cmapData[
$i++]);
254 $this->_glyphIndexArray[0x41] = ord($cmapData[
$i++]);
255 $this->_glyphIndexArray[0x42] = ord($cmapData[
$i++]);
256 $this->_glyphIndexArray[0x43] = ord($cmapData[
$i++]);
257 $this->_glyphIndexArray[0x44] = ord($cmapData[
$i++]);
258 $this->_glyphIndexArray[0x45] = ord($cmapData[
$i++]);
259 $this->_glyphIndexArray[0x46] = ord($cmapData[
$i++]);
260 $this->_glyphIndexArray[0x47] = ord($cmapData[
$i++]);
261 $this->_glyphIndexArray[0x48] = ord($cmapData[
$i++]);
262 $this->_glyphIndexArray[0x49] = ord($cmapData[
$i++]);
263 $this->_glyphIndexArray[0x4a] = ord($cmapData[
$i++]);
264 $this->_glyphIndexArray[0x4b] = ord($cmapData[
$i++]);
265 $this->_glyphIndexArray[0x4c] = ord($cmapData[
$i++]);
266 $this->_glyphIndexArray[0x4d] = ord($cmapData[
$i++]);
267 $this->_glyphIndexArray[0x4e] = ord($cmapData[
$i++]);
268 $this->_glyphIndexArray[0x4f] = ord($cmapData[
$i++]);
269 $this->_glyphIndexArray[0x50] = ord($cmapData[
$i++]);
270 $this->_glyphIndexArray[0x51] = ord($cmapData[
$i++]);
271 $this->_glyphIndexArray[0x52] = ord($cmapData[
$i++]);
272 $this->_glyphIndexArray[0x53] = ord($cmapData[
$i++]);
273 $this->_glyphIndexArray[0x54] = ord($cmapData[
$i++]);
274 $this->_glyphIndexArray[0x55] = ord($cmapData[
$i++]);
275 $this->_glyphIndexArray[0x56] = ord($cmapData[
$i++]);
276 $this->_glyphIndexArray[0x57] = ord($cmapData[
$i++]);
277 $this->_glyphIndexArray[0x58] = ord($cmapData[
$i++]);
278 $this->_glyphIndexArray[0x59] = ord($cmapData[
$i++]);
279 $this->_glyphIndexArray[0x5a] = ord($cmapData[
$i++]);
280 $this->_glyphIndexArray[0x5b] = ord($cmapData[
$i++]);
281 $this->_glyphIndexArray[0x5c] = ord($cmapData[
$i++]);
282 $this->_glyphIndexArray[0x5d] = ord($cmapData[
$i++]);
283 $this->_glyphIndexArray[0x5e] = ord($cmapData[
$i++]);
284 $this->_glyphIndexArray[0x5f] = ord($cmapData[
$i++]);
285 $this->_glyphIndexArray[0x60] = ord($cmapData[
$i++]);
286 $this->_glyphIndexArray[0x61] = ord($cmapData[
$i++]);
287 $this->_glyphIndexArray[0x62] = ord($cmapData[
$i++]);
288 $this->_glyphIndexArray[0x63] = ord($cmapData[
$i++]);
289 $this->_glyphIndexArray[0x64] = ord($cmapData[
$i++]);
290 $this->_glyphIndexArray[0x65] = ord($cmapData[
$i++]);
291 $this->_glyphIndexArray[0x66] = ord($cmapData[
$i++]);
292 $this->_glyphIndexArray[0x67] = ord($cmapData[
$i++]);
293 $this->_glyphIndexArray[0x68] = ord($cmapData[
$i++]);
294 $this->_glyphIndexArray[0x69] = ord($cmapData[
$i++]);
295 $this->_glyphIndexArray[0x6a] = ord($cmapData[
$i++]);
296 $this->_glyphIndexArray[0x6b] = ord($cmapData[
$i++]);
297 $this->_glyphIndexArray[0x6c] = ord($cmapData[
$i++]);
298 $this->_glyphIndexArray[0x6d] = ord($cmapData[
$i++]);
299 $this->_glyphIndexArray[0x6e] = ord($cmapData[
$i++]);
300 $this->_glyphIndexArray[0x6f] = ord($cmapData[
$i++]);
301 $this->_glyphIndexArray[0x70] = ord($cmapData[
$i++]);
302 $this->_glyphIndexArray[0x71] = ord($cmapData[
$i++]);
303 $this->_glyphIndexArray[0x72] = ord($cmapData[
$i++]);
304 $this->_glyphIndexArray[0x73] = ord($cmapData[
$i++]);
305 $this->_glyphIndexArray[0x74] = ord($cmapData[
$i++]);
306 $this->_glyphIndexArray[0x75] = ord($cmapData[
$i++]);
307 $this->_glyphIndexArray[0x76] = ord($cmapData[
$i++]);
308 $this->_glyphIndexArray[0x77] = ord($cmapData[
$i++]);
309 $this->_glyphIndexArray[0x78] = ord($cmapData[
$i++]);
310 $this->_glyphIndexArray[0x79] = ord($cmapData[
$i++]);
311 $this->_glyphIndexArray[0x7a] = ord($cmapData[
$i++]);
312 $this->_glyphIndexArray[0x7b] = ord($cmapData[
$i++]);
313 $this->_glyphIndexArray[0x7c] = ord($cmapData[
$i++]);
314 $this->_glyphIndexArray[0x7d] = ord($cmapData[
$i++]);
315 $this->_glyphIndexArray[0x7e] = ord($cmapData[
$i++]);
316 $this->_glyphIndexArray[0x7f] = ord($cmapData[
$i++]);
317 $this->_glyphIndexArray[0xc4] = ord($cmapData[
$i++]);
318 $this->_glyphIndexArray[0xc5] = ord($cmapData[
$i++]);
319 $this->_glyphIndexArray[0xc7] = ord($cmapData[
$i++]);
320 $this->_glyphIndexArray[0xc9] = ord($cmapData[
$i++]);
321 $this->_glyphIndexArray[0xd1] = ord($cmapData[
$i++]);
322 $this->_glyphIndexArray[0xd6] = ord($cmapData[
$i++]);
323 $this->_glyphIndexArray[0xdc] = ord($cmapData[
$i++]);
324 $this->_glyphIndexArray[0xe1] = ord($cmapData[
$i++]);
325 $this->_glyphIndexArray[0xe0] = ord($cmapData[
$i++]);
326 $this->_glyphIndexArray[0xe2] = ord($cmapData[
$i++]);
327 $this->_glyphIndexArray[0xe4] = ord($cmapData[
$i++]);
328 $this->_glyphIndexArray[0xe3] = ord($cmapData[
$i++]);
329 $this->_glyphIndexArray[0xe5] = ord($cmapData[
$i++]);
330 $this->_glyphIndexArray[0xe7] = ord($cmapData[
$i++]);
331 $this->_glyphIndexArray[0xe9] = ord($cmapData[
$i++]);
332 $this->_glyphIndexArray[0xe8] = ord($cmapData[
$i++]);
333 $this->_glyphIndexArray[0xea] = ord($cmapData[
$i++]);
334 $this->_glyphIndexArray[0xeb] = ord($cmapData[
$i++]);
335 $this->_glyphIndexArray[0xed] = ord($cmapData[
$i++]);
336 $this->_glyphIndexArray[0xec] = ord($cmapData[
$i++]);
337 $this->_glyphIndexArray[0xee] = ord($cmapData[
$i++]);
338 $this->_glyphIndexArray[0xef] = ord($cmapData[
$i++]);
339 $this->_glyphIndexArray[0xf1] = ord($cmapData[
$i++]);
340 $this->_glyphIndexArray[0xf3] = ord($cmapData[
$i++]);
341 $this->_glyphIndexArray[0xf2] = ord($cmapData[
$i++]);
342 $this->_glyphIndexArray[0xf4] = ord($cmapData[
$i++]);
343 $this->_glyphIndexArray[0xf6] = ord($cmapData[
$i++]);
344 $this->_glyphIndexArray[0xf5] = ord($cmapData[
$i++]);
345 $this->_glyphIndexArray[0xfa] = ord($cmapData[
$i++]);
346 $this->_glyphIndexArray[0xf9] = ord($cmapData[
$i++]);
347 $this->_glyphIndexArray[0xfb] = ord($cmapData[
$i++]);
348 $this->_glyphIndexArray[0xfc] = ord($cmapData[
$i++]);
349 $this->_glyphIndexArray[0x2020] = ord($cmapData[
$i++]);
350 $this->_glyphIndexArray[0xb0] = ord($cmapData[
$i++]);
351 $this->_glyphIndexArray[0xa2] = ord($cmapData[
$i++]);
352 $this->_glyphIndexArray[0xa3] = ord($cmapData[
$i++]);
353 $this->_glyphIndexArray[0xa7] = ord($cmapData[
$i++]);
354 $this->_glyphIndexArray[0x2022] = ord($cmapData[
$i++]);
355 $this->_glyphIndexArray[0xb6] = ord($cmapData[
$i++]);
356 $this->_glyphIndexArray[0xdf] = ord($cmapData[
$i++]);
357 $this->_glyphIndexArray[0xae] = ord($cmapData[
$i++]);
358 $this->_glyphIndexArray[0xa9] = ord($cmapData[
$i++]);
359 $this->_glyphIndexArray[0x2122] = ord($cmapData[
$i++]);
360 $this->_glyphIndexArray[0xb4] = ord($cmapData[
$i++]);
361 $this->_glyphIndexArray[0xa8] = ord($cmapData[
$i++]);
362 $this->_glyphIndexArray[0x2260] = ord($cmapData[
$i++]);
363 $this->_glyphIndexArray[0xc6] = ord($cmapData[
$i++]);
364 $this->_glyphIndexArray[0xd8] = ord($cmapData[
$i++]);
365 $this->_glyphIndexArray[0x221e] = ord($cmapData[
$i++]);
366 $this->_glyphIndexArray[0xb1] = ord($cmapData[
$i++]);
367 $this->_glyphIndexArray[0x2264] = ord($cmapData[
$i++]);
368 $this->_glyphIndexArray[0x2265] = ord($cmapData[
$i++]);
369 $this->_glyphIndexArray[0xa5] = ord($cmapData[
$i++]);
370 $this->_glyphIndexArray[0xb5] = ord($cmapData[
$i++]);
371 $this->_glyphIndexArray[0x2202] = ord($cmapData[
$i++]);
372 $this->_glyphIndexArray[0x2211] = ord($cmapData[
$i++]);
373 $this->_glyphIndexArray[0x220f] = ord($cmapData[
$i++]);
374 $this->_glyphIndexArray[0x03c0] = ord($cmapData[
$i++]);
375 $this->_glyphIndexArray[0x222b] = ord($cmapData[
$i++]);
376 $this->_glyphIndexArray[0xaa] = ord($cmapData[
$i++]);
377 $this->_glyphIndexArray[0xba] = ord($cmapData[
$i++]);
378 $this->_glyphIndexArray[0x03a9] = ord($cmapData[
$i++]);
379 $this->_glyphIndexArray[0xe6] = ord($cmapData[
$i++]);
380 $this->_glyphIndexArray[0xf8] = ord($cmapData[
$i++]);
381 $this->_glyphIndexArray[0xbf] = ord($cmapData[
$i++]);
382 $this->_glyphIndexArray[0xa1] = ord($cmapData[
$i++]);
383 $this->_glyphIndexArray[0xac] = ord($cmapData[
$i++]);
384 $this->_glyphIndexArray[0x221a] = ord($cmapData[
$i++]);
385 $this->_glyphIndexArray[0x0192] = ord($cmapData[
$i++]);
386 $this->_glyphIndexArray[0x2248] = ord($cmapData[
$i++]);
387 $this->_glyphIndexArray[0x2206] = ord($cmapData[
$i++]);
388 $this->_glyphIndexArray[0xab] = ord($cmapData[
$i++]);
389 $this->_glyphIndexArray[0xbb] = ord($cmapData[
$i++]);
390 $this->_glyphIndexArray[0x2026] = ord($cmapData[
$i++]);
391 $this->_glyphIndexArray[0xa0] = ord($cmapData[
$i++]);
392 $this->_glyphIndexArray[0xc0] = ord($cmapData[
$i++]);
393 $this->_glyphIndexArray[0xc3] = ord($cmapData[
$i++]);
394 $this->_glyphIndexArray[0xd5] = ord($cmapData[
$i++]);
395 $this->_glyphIndexArray[0x0152] = ord($cmapData[
$i++]);
396 $this->_glyphIndexArray[0x0153] = ord($cmapData[
$i++]);
397 $this->_glyphIndexArray[0x2013] = ord($cmapData[
$i++]);
398 $this->_glyphIndexArray[0x2014] = ord($cmapData[
$i++]);
399 $this->_glyphIndexArray[0x201c] = ord($cmapData[
$i++]);
400 $this->_glyphIndexArray[0x201d] = ord($cmapData[
$i++]);
401 $this->_glyphIndexArray[0x2018] = ord($cmapData[
$i++]);
402 $this->_glyphIndexArray[0x2019] = ord($cmapData[
$i++]);
403 $this->_glyphIndexArray[0xf7] = ord($cmapData[
$i++]);
404 $this->_glyphIndexArray[0x25ca] = ord($cmapData[
$i++]);
405 $this->_glyphIndexArray[0xff] = ord($cmapData[
$i++]);
406 $this->_glyphIndexArray[0x0178] = ord($cmapData[
$i++]);
407 $this->_glyphIndexArray[0x2044] = ord($cmapData[
$i++]);
408 $this->_glyphIndexArray[0x20ac] = ord($cmapData[
$i++]);
409 $this->_glyphIndexArray[0x2039] = ord($cmapData[
$i++]);
410 $this->_glyphIndexArray[0x203a] = ord($cmapData[
$i++]);
411 $this->_glyphIndexArray[0xfb01] = ord($cmapData[
$i++]);
412 $this->_glyphIndexArray[0xfb02] = ord($cmapData[
$i++]);
413 $this->_glyphIndexArray[0x2021] = ord($cmapData[
$i++]);
414 $this->_glyphIndexArray[0xb7] = ord($cmapData[
$i++]);
415 $this->_glyphIndexArray[0x201a] = ord($cmapData[
$i++]);
416 $this->_glyphIndexArray[0x201e] = ord($cmapData[
$i++]);
417 $this->_glyphIndexArray[0x2030] = ord($cmapData[
$i++]);
418 $this->_glyphIndexArray[0xc2] = ord($cmapData[
$i++]);
419 $this->_glyphIndexArray[0xca] = ord($cmapData[
$i++]);
420 $this->_glyphIndexArray[0xc1] = ord($cmapData[
$i++]);
421 $this->_glyphIndexArray[0xcb] = ord($cmapData[
$i++]);
422 $this->_glyphIndexArray[0xc8] = ord($cmapData[
$i++]);
423 $this->_glyphIndexArray[0xcd] = ord($cmapData[
$i++]);
424 $this->_glyphIndexArray[0xce] = ord($cmapData[
$i++]);
425 $this->_glyphIndexArray[0xcf] = ord($cmapData[
$i++]);
426 $this->_glyphIndexArray[0xcc] = ord($cmapData[
$i++]);
427 $this->_glyphIndexArray[0xd3] = ord($cmapData[
$i++]);
428 $this->_glyphIndexArray[0xd4] = ord($cmapData[
$i++]);
429 $this->_glyphIndexArray[0xf8ff] = ord($cmapData[
$i++]);
430 $this->_glyphIndexArray[0xd2] = ord($cmapData[
$i++]);
431 $this->_glyphIndexArray[0xda] = ord($cmapData[
$i++]);
432 $this->_glyphIndexArray[0xdb] = ord($cmapData[
$i++]);
433 $this->_glyphIndexArray[0xd9] = ord($cmapData[
$i++]);
434 $this->_glyphIndexArray[0x0131] = ord($cmapData[
$i++]);
435 $this->_glyphIndexArray[0x02c6] = ord($cmapData[
$i++]);
436 $this->_glyphIndexArray[0x02dc] = ord($cmapData[
$i++]);
437 $this->_glyphIndexArray[0xaf] = ord($cmapData[
$i++]);
438 $this->_glyphIndexArray[0x02d8] = ord($cmapData[
$i++]);
439 $this->_glyphIndexArray[0x02d9] = ord($cmapData[
$i++]);
440 $this->_glyphIndexArray[0x02da] = ord($cmapData[
$i++]);
441 $this->_glyphIndexArray[0xb8] = ord($cmapData[
$i++]);
442 $this->_glyphIndexArray[0x02dd] = ord($cmapData[
$i++]);
443 $this->_glyphIndexArray[0x02db] = ord($cmapData[
$i++]);
444 $this->_glyphIndexArray[0x02c7] = ord($cmapData[
$i]);
const CMAP_WRONG_TABLE_LENGTH
const CMAP_TABLE_DATA_TOO_SMALL
const CMAP_WRONG_TABLE_TYPE
_extractUInt2(&$data, $index)