OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "core/src/fpdfapi/fpdf_font/font_int.h" | 7 #include "core/fpdfapi/fpdf_font/font_int.h" |
8 | 8 |
| 9 #include "core/fpdfapi/fpdf_cmaps/cmap_int.h" |
| 10 #include "core/fpdfapi/fpdf_font/ttgsubtable.h" |
9 #include "core/include/fpdfapi/cpdf_array.h" | 11 #include "core/include/fpdfapi/cpdf_array.h" |
10 #include "core/include/fpdfapi/cpdf_dictionary.h" | 12 #include "core/include/fpdfapi/cpdf_dictionary.h" |
11 #include "core/include/fpdfapi/cpdf_simple_parser.h" | 13 #include "core/include/fpdfapi/cpdf_simple_parser.h" |
12 #include "core/include/fpdfapi/fpdf_module.h" | 14 #include "core/include/fpdfapi/fpdf_module.h" |
13 #include "core/include/fpdfapi/fpdf_page.h" | 15 #include "core/include/fpdfapi/fpdf_page.h" |
14 #include "core/include/fpdfapi/fpdf_resource.h" | 16 #include "core/include/fpdfapi/fpdf_resource.h" |
15 #include "core/include/fxcrt/fx_ext.h" | 17 #include "core/include/fxcrt/fx_ext.h" |
16 #include "core/include/fxge/fx_freetype.h" | 18 #include "core/include/fxge/fx_freetype.h" |
17 #include "core/include/fxge/fx_ge.h" | 19 #include "core/include/fxge/fx_ge.h" |
18 #include "core/src/fpdfapi/fpdf_cmaps/cmap_int.h" | |
19 #include "core/src/fpdfapi/fpdf_font/ttgsubtable.h" | |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 const FX_CHAR* const g_CharsetNames[CIDSET_NUM_SETS] = | 23 const FX_CHAR* const g_CharsetNames[CIDSET_NUM_SETS] = { |
24 {nullptr, "GB1", "CNS1", "Japan1", "Korea1", "UCS"}; | 24 nullptr, "GB1", "CNS1", "Japan1", "Korea1", "UCS"}; |
25 | 25 |
26 const int g_CharsetCPs[CIDSET_NUM_SETS] = {0, 936, 950, 932, 949, 1200}; | 26 const int g_CharsetCPs[CIDSET_NUM_SETS] = {0, 936, 950, 932, 949, 1200}; |
27 | 27 |
28 class CPDF_PredefinedCMap { | 28 class CPDF_PredefinedCMap { |
29 public: | 29 public: |
30 const FX_CHAR* m_pName; | 30 const FX_CHAR* m_pName; |
31 CIDSet m_Charset; | 31 CIDSet m_Charset; |
32 int m_Coding; | 32 int m_Coding; |
33 CPDF_CMap::CodingScheme m_CodingScheme; | 33 CPDF_CMap::CodingScheme m_CodingScheme; |
34 FX_DWORD m_LeadingSegCount; | 34 FX_DWORD m_LeadingSegCount; |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 } | 369 } |
370 if (err && FXFT_Get_Face_Charmaps(face)) { | 370 if (err && FXFT_Get_Face_Charmaps(face)) { |
371 FXFT_Set_Charmap(face, *FXFT_Get_Face_Charmaps(face)); | 371 FXFT_Set_Charmap(face, *FXFT_Get_Face_Charmaps(face)); |
372 } | 372 } |
373 } | 373 } |
374 | 374 |
375 const struct CIDTransform { | 375 const struct CIDTransform { |
376 FX_WORD CID; | 376 FX_WORD CID; |
377 uint8_t a, b, c, d, e, f; | 377 uint8_t a, b, c, d, e, f; |
378 } g_Japan1_VertCIDs[] = { | 378 } g_Japan1_VertCIDs[] = { |
379 {97, 129, 0, 0, 127, 55, 0}, | 379 {97, 129, 0, 0, 127, 55, 0}, {7887, 127, 0, 0, 127, 76, 89}, |
380 {7887, 127, 0, 0, 127, 76, 89}, | 380 {7888, 127, 0, 0, 127, 79, 94}, {7889, 0, 129, 127, 0, 17, 127}, |
381 {7888, 127, 0, 0, 127, 79, 94}, | 381 {7890, 0, 129, 127, 0, 17, 127}, {7891, 0, 129, 127, 0, 17, 127}, |
382 {7889, 0, 129, 127, 0, 17, 127}, | 382 {7892, 0, 129, 127, 0, 17, 127}, {7893, 0, 129, 127, 0, 17, 127}, |
383 {7890, 0, 129, 127, 0, 17, 127}, | 383 {7894, 0, 129, 127, 0, 17, 127}, {7895, 0, 129, 127, 0, 17, 127}, |
384 {7891, 0, 129, 127, 0, 17, 127}, | 384 {7896, 0, 129, 127, 0, 17, 127}, {7897, 0, 129, 127, 0, 17, 127}, |
385 {7892, 0, 129, 127, 0, 17, 127}, | 385 {7898, 0, 129, 127, 0, 17, 127}, {7899, 0, 129, 127, 0, 17, 104}, |
386 {7893, 0, 129, 127, 0, 17, 127}, | 386 {7900, 0, 129, 127, 0, 17, 127}, {7901, 0, 129, 127, 0, 17, 104}, |
387 {7894, 0, 129, 127, 0, 17, 127}, | 387 {7902, 0, 129, 127, 0, 17, 127}, {7903, 0, 129, 127, 0, 17, 127}, |
388 {7895, 0, 129, 127, 0, 17, 127}, | 388 {7904, 0, 129, 127, 0, 17, 127}, {7905, 0, 129, 127, 0, 17, 114}, |
389 {7896, 0, 129, 127, 0, 17, 127}, | 389 {7906, 0, 129, 127, 0, 17, 127}, {7907, 0, 129, 127, 0, 17, 127}, |
390 {7897, 0, 129, 127, 0, 17, 127}, | 390 {7908, 0, 129, 127, 0, 17, 127}, {7909, 0, 129, 127, 0, 17, 127}, |
391 {7898, 0, 129, 127, 0, 17, 127}, | 391 {7910, 0, 129, 127, 0, 17, 127}, {7911, 0, 129, 127, 0, 17, 127}, |
392 {7899, 0, 129, 127, 0, 17, 104}, | 392 {7912, 0, 129, 127, 0, 17, 127}, {7913, 0, 129, 127, 0, 17, 127}, |
393 {7900, 0, 129, 127, 0, 17, 127}, | 393 {7914, 0, 129, 127, 0, 17, 127}, {7915, 0, 129, 127, 0, 17, 114}, |
394 {7901, 0, 129, 127, 0, 17, 104}, | 394 {7916, 0, 129, 127, 0, 17, 127}, {7917, 0, 129, 127, 0, 17, 127}, |
395 {7902, 0, 129, 127, 0, 17, 127}, | 395 {7918, 127, 0, 0, 127, 18, 25}, {7919, 127, 0, 0, 127, 18, 25}, |
396 {7903, 0, 129, 127, 0, 17, 127}, | 396 {7920, 127, 0, 0, 127, 18, 25}, {7921, 127, 0, 0, 127, 18, 25}, |
397 {7904, 0, 129, 127, 0, 17, 127}, | 397 {7922, 127, 0, 0, 127, 18, 25}, {7923, 127, 0, 0, 127, 18, 25}, |
398 {7905, 0, 129, 127, 0, 17, 114}, | 398 {7924, 127, 0, 0, 127, 18, 25}, {7925, 127, 0, 0, 127, 18, 25}, |
399 {7906, 0, 129, 127, 0, 17, 127}, | 399 {7926, 127, 0, 0, 127, 18, 25}, {7927, 127, 0, 0, 127, 18, 25}, |
400 {7907, 0, 129, 127, 0, 17, 127}, | 400 {7928, 127, 0, 0, 127, 18, 25}, {7929, 127, 0, 0, 127, 18, 25}, |
401 {7908, 0, 129, 127, 0, 17, 127}, | 401 {7930, 127, 0, 0, 127, 18, 25}, {7931, 127, 0, 0, 127, 18, 25}, |
402 {7909, 0, 129, 127, 0, 17, 127}, | 402 {7932, 127, 0, 0, 127, 18, 25}, {7933, 127, 0, 0, 127, 18, 25}, |
403 {7910, 0, 129, 127, 0, 17, 127}, | 403 {7934, 127, 0, 0, 127, 18, 25}, {7935, 127, 0, 0, 127, 18, 25}, |
404 {7911, 0, 129, 127, 0, 17, 127}, | 404 {7936, 127, 0, 0, 127, 18, 25}, {7937, 127, 0, 0, 127, 18, 25}, |
405 {7912, 0, 129, 127, 0, 17, 127}, | 405 {7938, 127, 0, 0, 127, 18, 25}, {7939, 127, 0, 0, 127, 18, 25}, |
406 {7913, 0, 129, 127, 0, 17, 127}, | 406 {8720, 0, 129, 127, 0, 19, 102}, {8721, 0, 129, 127, 0, 13, 127}, |
407 {7914, 0, 129, 127, 0, 17, 127}, | 407 {8722, 0, 129, 127, 0, 19, 108}, {8723, 0, 129, 127, 0, 19, 102}, |
408 {7915, 0, 129, 127, 0, 17, 114}, | 408 {8724, 0, 129, 127, 0, 19, 102}, {8725, 0, 129, 127, 0, 19, 102}, |
409 {7916, 0, 129, 127, 0, 17, 127}, | 409 {8726, 0, 129, 127, 0, 19, 102}, {8727, 0, 129, 127, 0, 19, 102}, |
410 {7917, 0, 129, 127, 0, 17, 127}, | 410 {8728, 0, 129, 127, 0, 19, 114}, {8729, 0, 129, 127, 0, 19, 114}, |
411 {7918, 127, 0, 0, 127, 18, 25}, | 411 {8730, 0, 129, 127, 0, 38, 108}, {8731, 0, 129, 127, 0, 13, 108}, |
412 {7919, 127, 0, 0, 127, 18, 25}, | 412 {8732, 0, 129, 127, 0, 19, 108}, {8733, 0, 129, 127, 0, 19, 108}, |
413 {7920, 127, 0, 0, 127, 18, 25}, | 413 {8734, 0, 129, 127, 0, 19, 108}, {8735, 0, 129, 127, 0, 19, 108}, |
414 {7921, 127, 0, 0, 127, 18, 25}, | 414 {8736, 0, 129, 127, 0, 19, 102}, {8737, 0, 129, 127, 0, 19, 102}, |
415 {7922, 127, 0, 0, 127, 18, 25}, | 415 {8738, 0, 129, 127, 0, 19, 102}, {8739, 0, 129, 127, 0, 19, 102}, |
416 {7923, 127, 0, 0, 127, 18, 25}, | 416 {8740, 0, 129, 127, 0, 19, 102}, {8741, 0, 129, 127, 0, 19, 102}, |
417 {7924, 127, 0, 0, 127, 18, 25}, | 417 {8742, 0, 129, 127, 0, 19, 102}, {8743, 0, 129, 127, 0, 19, 102}, |
418 {7925, 127, 0, 0, 127, 18, 25}, | 418 {8744, 0, 129, 127, 0, 19, 102}, {8745, 0, 129, 127, 0, 19, 102}, |
419 {7926, 127, 0, 0, 127, 18, 25}, | 419 {8746, 0, 129, 127, 0, 19, 114}, {8747, 0, 129, 127, 0, 19, 114}, |
420 {7927, 127, 0, 0, 127, 18, 25}, | 420 {8748, 0, 129, 127, 0, 19, 102}, {8749, 0, 129, 127, 0, 19, 102}, |
421 {7928, 127, 0, 0, 127, 18, 25}, | 421 {8750, 0, 129, 127, 0, 19, 102}, {8751, 0, 129, 127, 0, 19, 102}, |
422 {7929, 127, 0, 0, 127, 18, 25}, | 422 {8752, 0, 129, 127, 0, 19, 102}, {8753, 0, 129, 127, 0, 19, 102}, |
423 {7930, 127, 0, 0, 127, 18, 25}, | 423 {8754, 0, 129, 127, 0, 19, 102}, {8755, 0, 129, 127, 0, 19, 102}, |
424 {7931, 127, 0, 0, 127, 18, 25}, | 424 {8756, 0, 129, 127, 0, 19, 102}, {8757, 0, 129, 127, 0, 19, 102}, |
425 {7932, 127, 0, 0, 127, 18, 25}, | 425 {8758, 0, 129, 127, 0, 19, 102}, {8759, 0, 129, 127, 0, 19, 102}, |
426 {7933, 127, 0, 0, 127, 18, 25}, | 426 {8760, 0, 129, 127, 0, 19, 102}, {8761, 0, 129, 127, 0, 19, 102}, |
427 {7934, 127, 0, 0, 127, 18, 25}, | 427 {8762, 0, 129, 127, 0, 19, 102}, {8763, 0, 129, 127, 0, 19, 102}, |
428 {7935, 127, 0, 0, 127, 18, 25}, | 428 {8764, 0, 129, 127, 0, 19, 102}, {8765, 0, 129, 127, 0, 19, 102}, |
429 {7936, 127, 0, 0, 127, 18, 25}, | 429 {8766, 0, 129, 127, 0, 19, 102}, {8767, 0, 129, 127, 0, 19, 102}, |
430 {7937, 127, 0, 0, 127, 18, 25}, | 430 {8768, 0, 129, 127, 0, 19, 102}, {8769, 0, 129, 127, 0, 19, 102}, |
431 {7938, 127, 0, 0, 127, 18, 25}, | 431 {8770, 0, 129, 127, 0, 19, 102}, {8771, 0, 129, 127, 0, 19, 102}, |
432 {7939, 127, 0, 0, 127, 18, 25}, | 432 {8772, 0, 129, 127, 0, 19, 102}, {8773, 0, 129, 127, 0, 19, 102}, |
433 {8720, 0, 129, 127, 0, 19, 102}, | 433 {8774, 0, 129, 127, 0, 19, 102}, {8775, 0, 129, 127, 0, 19, 102}, |
434 {8721, 0, 129, 127, 0, 13, 127}, | 434 {8776, 0, 129, 127, 0, 19, 102}, {8777, 0, 129, 127, 0, 19, 102}, |
435 {8722, 0, 129, 127, 0, 19, 108}, | 435 {8778, 0, 129, 127, 0, 19, 102}, {8779, 0, 129, 127, 0, 19, 114}, |
436 {8723, 0, 129, 127, 0, 19, 102}, | 436 {8780, 0, 129, 127, 0, 19, 108}, {8781, 0, 129, 127, 0, 19, 114}, |
437 {8724, 0, 129, 127, 0, 19, 102}, | 437 {8782, 0, 129, 127, 0, 13, 114}, {8783, 0, 129, 127, 0, 19, 108}, |
438 {8725, 0, 129, 127, 0, 19, 102}, | 438 {8784, 0, 129, 127, 0, 13, 114}, {8785, 0, 129, 127, 0, 19, 108}, |
439 {8726, 0, 129, 127, 0, 19, 102}, | 439 {8786, 0, 129, 127, 0, 19, 108}, {8787, 0, 129, 127, 0, 19, 108}, |
440 {8727, 0, 129, 127, 0, 19, 102}, | 440 {8788, 0, 129, 127, 0, 19, 108}, {8789, 0, 129, 127, 0, 19, 108}, |
441 {8728, 0, 129, 127, 0, 19, 114}, | 441 {8790, 0, 129, 127, 0, 19, 108}, {8791, 0, 129, 127, 0, 19, 108}, |
442 {8729, 0, 129, 127, 0, 19, 114}, | 442 {8792, 0, 129, 127, 0, 19, 108}, {8793, 0, 129, 127, 0, 19, 108}, |
443 {8730, 0, 129, 127, 0, 38, 108}, | 443 {8794, 0, 129, 127, 0, 19, 108}, {8795, 0, 129, 127, 0, 19, 108}, |
444 {8731, 0, 129, 127, 0, 13, 108}, | 444 {8796, 0, 129, 127, 0, 19, 108}, {8797, 0, 129, 127, 0, 19, 108}, |
445 {8732, 0, 129, 127, 0, 19, 108}, | 445 {8798, 0, 129, 127, 0, 19, 108}, {8799, 0, 129, 127, 0, 19, 108}, |
446 {8733, 0, 129, 127, 0, 19, 108}, | 446 {8800, 0, 129, 127, 0, 19, 108}, {8801, 0, 129, 127, 0, 19, 108}, |
447 {8734, 0, 129, 127, 0, 19, 108}, | 447 {8802, 0, 129, 127, 0, 19, 108}, {8803, 0, 129, 127, 0, 19, 108}, |
448 {8735, 0, 129, 127, 0, 19, 108}, | 448 {8804, 0, 129, 127, 0, 19, 108}, {8805, 0, 129, 127, 0, 19, 108}, |
449 {8736, 0, 129, 127, 0, 19, 102}, | 449 {8806, 0, 129, 127, 0, 19, 108}, {8807, 0, 129, 127, 0, 19, 108}, |
450 {8737, 0, 129, 127, 0, 19, 102}, | 450 {8808, 0, 129, 127, 0, 19, 108}, {8809, 0, 129, 127, 0, 19, 108}, |
451 {8738, 0, 129, 127, 0, 19, 102}, | 451 {8810, 0, 129, 127, 0, 19, 108}, {8811, 0, 129, 127, 0, 19, 114}, |
452 {8739, 0, 129, 127, 0, 19, 102}, | 452 {8812, 0, 129, 127, 0, 19, 102}, {8813, 0, 129, 127, 0, 19, 114}, |
453 {8740, 0, 129, 127, 0, 19, 102}, | 453 {8814, 0, 129, 127, 0, 76, 102}, {8815, 0, 129, 127, 0, 13, 121}, |
454 {8741, 0, 129, 127, 0, 19, 102}, | 454 {8816, 0, 129, 127, 0, 19, 114}, {8817, 0, 129, 127, 0, 19, 127}, |
455 {8742, 0, 129, 127, 0, 19, 102}, | 455 {8818, 0, 129, 127, 0, 19, 114}, {8819, 0, 129, 127, 0, 218, 108}, |
456 {8743, 0, 129, 127, 0, 19, 102}, | |
457 {8744, 0, 129, 127, 0, 19, 102}, | |
458 {8745, 0, 129, 127, 0, 19, 102}, | |
459 {8746, 0, 129, 127, 0, 19, 114}, | |
460 {8747, 0, 129, 127, 0, 19, 114}, | |
461 {8748, 0, 129, 127, 0, 19, 102}, | |
462 {8749, 0, 129, 127, 0, 19, 102}, | |
463 {8750, 0, 129, 127, 0, 19, 102}, | |
464 {8751, 0, 129, 127, 0, 19, 102}, | |
465 {8752, 0, 129, 127, 0, 19, 102}, | |
466 {8753, 0, 129, 127, 0, 19, 102}, | |
467 {8754, 0, 129, 127, 0, 19, 102}, | |
468 {8755, 0, 129, 127, 0, 19, 102}, | |
469 {8756, 0, 129, 127, 0, 19, 102}, | |
470 {8757, 0, 129, 127, 0, 19, 102}, | |
471 {8758, 0, 129, 127, 0, 19, 102}, | |
472 {8759, 0, 129, 127, 0, 19, 102}, | |
473 {8760, 0, 129, 127, 0, 19, 102}, | |
474 {8761, 0, 129, 127, 0, 19, 102}, | |
475 {8762, 0, 129, 127, 0, 19, 102}, | |
476 {8763, 0, 129, 127, 0, 19, 102}, | |
477 {8764, 0, 129, 127, 0, 19, 102}, | |
478 {8765, 0, 129, 127, 0, 19, 102}, | |
479 {8766, 0, 129, 127, 0, 19, 102}, | |
480 {8767, 0, 129, 127, 0, 19, 102}, | |
481 {8768, 0, 129, 127, 0, 19, 102}, | |
482 {8769, 0, 129, 127, 0, 19, 102}, | |
483 {8770, 0, 129, 127, 0, 19, 102}, | |
484 {8771, 0, 129, 127, 0, 19, 102}, | |
485 {8772, 0, 129, 127, 0, 19, 102}, | |
486 {8773, 0, 129, 127, 0, 19, 102}, | |
487 {8774, 0, 129, 127, 0, 19, 102}, | |
488 {8775, 0, 129, 127, 0, 19, 102}, | |
489 {8776, 0, 129, 127, 0, 19, 102}, | |
490 {8777, 0, 129, 127, 0, 19, 102}, | |
491 {8778, 0, 129, 127, 0, 19, 102}, | |
492 {8779, 0, 129, 127, 0, 19, 114}, | |
493 {8780, 0, 129, 127, 0, 19, 108}, | |
494 {8781, 0, 129, 127, 0, 19, 114}, | |
495 {8782, 0, 129, 127, 0, 13, 114}, | |
496 {8783, 0, 129, 127, 0, 19, 108}, | |
497 {8784, 0, 129, 127, 0, 13, 114}, | |
498 {8785, 0, 129, 127, 0, 19, 108}, | |
499 {8786, 0, 129, 127, 0, 19, 108}, | |
500 {8787, 0, 129, 127, 0, 19, 108}, | |
501 {8788, 0, 129, 127, 0, 19, 108}, | |
502 {8789, 0, 129, 127, 0, 19, 108}, | |
503 {8790, 0, 129, 127, 0, 19, 108}, | |
504 {8791, 0, 129, 127, 0, 19, 108}, | |
505 {8792, 0, 129, 127, 0, 19, 108}, | |
506 {8793, 0, 129, 127, 0, 19, 108}, | |
507 {8794, 0, 129, 127, 0, 19, 108}, | |
508 {8795, 0, 129, 127, 0, 19, 108}, | |
509 {8796, 0, 129, 127, 0, 19, 108}, | |
510 {8797, 0, 129, 127, 0, 19, 108}, | |
511 {8798, 0, 129, 127, 0, 19, 108}, | |
512 {8799, 0, 129, 127, 0, 19, 108}, | |
513 {8800, 0, 129, 127, 0, 19, 108}, | |
514 {8801, 0, 129, 127, 0, 19, 108}, | |
515 {8802, 0, 129, 127, 0, 19, 108}, | |
516 {8803, 0, 129, 127, 0, 19, 108}, | |
517 {8804, 0, 129, 127, 0, 19, 108}, | |
518 {8805, 0, 129, 127, 0, 19, 108}, | |
519 {8806, 0, 129, 127, 0, 19, 108}, | |
520 {8807, 0, 129, 127, 0, 19, 108}, | |
521 {8808, 0, 129, 127, 0, 19, 108}, | |
522 {8809, 0, 129, 127, 0, 19, 108}, | |
523 {8810, 0, 129, 127, 0, 19, 108}, | |
524 {8811, 0, 129, 127, 0, 19, 114}, | |
525 {8812, 0, 129, 127, 0, 19, 102}, | |
526 {8813, 0, 129, 127, 0, 19, 114}, | |
527 {8814, 0, 129, 127, 0, 76, 102}, | |
528 {8815, 0, 129, 127, 0, 13, 121}, | |
529 {8816, 0, 129, 127, 0, 19, 114}, | |
530 {8817, 0, 129, 127, 0, 19, 127}, | |
531 {8818, 0, 129, 127, 0, 19, 114}, | |
532 {8819, 0, 129, 127, 0, 218, 108}, | |
533 }; | 456 }; |
534 | 457 |
535 int CompareCIDTransform(const void* key, const void* element) { | 458 int CompareCIDTransform(const void* key, const void* element) { |
536 FX_WORD CID = *static_cast<const FX_WORD*>(key); | 459 FX_WORD CID = *static_cast<const FX_WORD*>(key); |
537 return CID - static_cast<const struct CIDTransform*>(element)->CID; | 460 return CID - static_cast<const struct CIDTransform*>(element)->CID; |
538 } | 461 } |
539 | 462 |
540 } // namespace | 463 } // namespace |
541 | 464 |
542 CPDF_CMapManager::CPDF_CMapManager() { | 465 CPDF_CMapManager::CPDF_CMapManager() { |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1052 } | 975 } |
1053 | 976 |
1054 CPDF_CIDFont::CPDF_CIDFont() | 977 CPDF_CIDFont::CPDF_CIDFont() |
1055 : m_pCMap(nullptr), | 978 : m_pCMap(nullptr), |
1056 m_pAllocatedCMap(nullptr), | 979 m_pAllocatedCMap(nullptr), |
1057 m_pCID2UnicodeMap(nullptr), | 980 m_pCID2UnicodeMap(nullptr), |
1058 m_pCIDToGIDMap(nullptr), | 981 m_pCIDToGIDMap(nullptr), |
1059 m_bCIDIsGID(FALSE), | 982 m_bCIDIsGID(FALSE), |
1060 m_pAnsiWidths(nullptr), | 983 m_pAnsiWidths(nullptr), |
1061 m_bAdobeCourierStd(FALSE), | 984 m_bAdobeCourierStd(FALSE), |
1062 m_pTTGSUBTable(nullptr) { | 985 m_pTTGSUBTable(nullptr) {} |
1063 } | |
1064 | 986 |
1065 CPDF_CIDFont::~CPDF_CIDFont() { | 987 CPDF_CIDFont::~CPDF_CIDFont() { |
1066 if (m_pAnsiWidths) { | 988 if (m_pAnsiWidths) { |
1067 FX_Free(m_pAnsiWidths); | 989 FX_Free(m_pAnsiWidths); |
1068 } | 990 } |
1069 delete m_pAllocatedCMap; | 991 delete m_pAllocatedCMap; |
1070 delete m_pCIDToGIDMap; | 992 delete m_pCIDToGIDMap; |
1071 delete m_pTTGSUBTable; | 993 delete m_pTTGSUBTable; |
1072 } | 994 } |
1073 | 995 |
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1745 | 1667 |
1746 const uint8_t* CPDF_CIDFont::GetCIDTransform(FX_WORD CID) const { | 1668 const uint8_t* CPDF_CIDFont::GetCIDTransform(FX_WORD CID) const { |
1747 if (m_Charset != CIDSET_JAPAN1 || m_pFontFile) | 1669 if (m_Charset != CIDSET_JAPAN1 || m_pFontFile) |
1748 return nullptr; | 1670 return nullptr; |
1749 | 1671 |
1750 const struct CIDTransform* found = (const struct CIDTransform*)FXSYS_bsearch( | 1672 const struct CIDTransform* found = (const struct CIDTransform*)FXSYS_bsearch( |
1751 &CID, g_Japan1_VertCIDs, FX_ArraySize(g_Japan1_VertCIDs), | 1673 &CID, g_Japan1_VertCIDs, FX_ArraySize(g_Japan1_VertCIDs), |
1752 sizeof(g_Japan1_VertCIDs[0]), CompareCIDTransform); | 1674 sizeof(g_Japan1_VertCIDs[0]), CompareCIDTransform); |
1753 return found ? &found->a : nullptr; | 1675 return found ? &found->a : nullptr; |
1754 } | 1676 } |
OLD | NEW |