diff options
Diffstat (limited to 'core/fpdfapi')
73 files changed, 233 insertions, 232 deletions
diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/Adobe-CNS1-UCS2_5.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/Adobe-CNS1-UCS2_5.cpp index 5a45d0aa39..30968a5bea 100644 --- a/core/fpdfapi/fpdf_cmaps/CNS1/Adobe-CNS1-UCS2_5.cpp +++ b/core/fpdfapi/fpdf_cmaps/CNS1/Adobe-CNS1-UCS2_5.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h" -const FX_WORD g_FXCMAP_CNS1CID2Unicode_5[19088] = { +const uint16_t g_FXCMAP_CNS1CID2Unicode_5[19088] = { 0xFFFD, 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F, 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/B5pc-H_0.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/B5pc-H_0.cpp index 532ecd1013..1b19edc3c4 100644 --- a/core/fpdfapi/fpdf_cmaps/CNS1/B5pc-H_0.cpp +++ b/core/fpdfapi/fpdf_cmaps/CNS1/B5pc-H_0.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h" -const FX_WORD g_FXCMAP_B5pc_H_0[247 * 3] = { +const uint16_t g_FXCMAP_B5pc_H_0[247 * 3] = { 0x0020, 0x007E, 0x0001, 0x0080, 0x0080, 0x003D, 0x00FD, 0x00FF, 0x0060, 0xA140, 0xA158, 0x0063, 0xA159, 0xA15C, 0x35AF, 0xA15D, 0xA17E, 0x0080, 0xA1A1, 0xA1F5, 0x00A2, 0xA1F6, 0xA1F6, 0x00F8, 0xA1F7, 0xA1F7, 0x00F7, diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/B5pc-V_0.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/B5pc-V_0.cpp index 482c4db05f..b872a69ab5 100644 --- a/core/fpdfapi/fpdf_cmaps/CNS1/B5pc-V_0.cpp +++ b/core/fpdfapi/fpdf_cmaps/CNS1/B5pc-V_0.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h" -const FX_WORD g_FXCMAP_B5pc_V_0[12 * 3] = { +const uint16_t g_FXCMAP_B5pc_V_0[12 * 3] = { 0xA14B, 0xA14B, 0x354E, 0xA15A, 0xA15A, 0x35AF, 0xA15C, 0xA15C, 0x35B1, 0xA15D, 0xA15E, 0x0082, 0xA161, 0xA162, 0x0086, 0xA165, 0xA166, 0x008A, 0xA169, 0xA16A, 0x008E, 0xA16D, 0xA16E, 0x0092, 0xA171, 0xA172, 0x0096, diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-H_0.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-H_0.cpp index 3d61451403..ab893832bb 100644 --- a/core/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-H_0.cpp +++ b/core/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-H_0.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h" -const FX_WORD g_FXCMAP_CNS_EUC_H_0[157 * 3] = { +const uint16_t g_FXCMAP_CNS_EUC_H_0[157 * 3] = { 0x0020, 0x007E, 0x3550, 0xA1A1, 0xA1FE, 0x0063, 0xA2A1, 0xA2FE, 0x00C1, 0xA3A1, 0xA3CE, 0x011F, 0xA4A1, 0xA4FE, 0x014D, 0xA5A1, 0xA5EC, 0x01AB, 0xA5EE, 0xA5F0, 0x01F7, 0xA6A1, 0xA6BE, 0x01FA, 0xA7A1, 0xA7A1, 0x0253, @@ -62,7 +62,7 @@ const FX_WORD g_FXCMAP_CNS_EUC_H_0[157 * 3] = { 0xFDA1, 0xFDCB, 0x1741, }; -const FX_WORD g_FXCMAP_CNS_EUC_H_0_DWord[238 * 4] = { +const uint16_t g_FXCMAP_CNS_EUC_H_0_DWord[238 * 4] = { 0x8EA1, 0xA1A1, 0xA1FE, 0x0063, 0x8EA1, 0xA2A1, 0xA2FE, 0x00C1, 0x8EA1, 0xA3A1, 0xA3CE, 0x011F, 0x8EA1, 0xA4A1, 0xA4FE, 0x014D, 0x8EA1, 0xA5A1, 0xA5EC, 0x01AB, 0x8EA1, 0xA5EE, 0xA5F0, 0x01F7, 0x8EA1, 0xA6A1, 0xA6BE, diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-V_0.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-V_0.cpp index 5348785d10..e3137ad6eb 100644 --- a/core/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-V_0.cpp +++ b/core/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-V_0.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h" -const FX_WORD g_FXCMAP_CNS_EUC_V_0[180 * 3] = { +const uint16_t g_FXCMAP_CNS_EUC_V_0[180 * 3] = { 0x0020, 0x007E, 0x3550, 0xA1A1, 0xA1AB, 0x0063, 0xA1AC, 0xA1AC, 0x354E, 0xA1AD, 0xA1BA, 0x006F, 0xA1BB, 0xA1BB, 0x007C, 0xA1BC, 0xA1BC, 0x007E, 0xA1BD, 0xA1BD, 0x007E, 0xA1BE, 0xA1BF, 0x0082, 0xA1C0, 0xA1C1, 0x0082, @@ -69,7 +69,7 @@ const FX_WORD g_FXCMAP_CNS_EUC_V_0[180 * 3] = { 0xFBA1, 0xFBFE, 0x1685, 0xFCA1, 0xFCFE, 0x16E3, 0xFDA1, 0xFDCB, 0x1741, }; -const FX_WORD g_FXCMAP_CNS_EUC_V_0_DWord[261 * 4] = { +const uint16_t g_FXCMAP_CNS_EUC_V_0_DWord[261 * 4] = { 0x8EA1, 0xA1A1, 0xA1AB, 0x0063, 0x8EA1, 0xA1AC, 0xA1AC, 0x354E, 0x8EA1, 0xA1AD, 0xA1BA, 0x006F, 0x8EA1, 0xA1BB, 0xA1BB, 0x007C, 0x8EA1, 0xA1BC, 0xA1BC, 0x007E, 0x8EA1, 0xA1BD, 0xA1BD, 0x007E, 0x8EA1, 0xA1BE, 0xA1BF, diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-H_0.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-H_0.cpp index 5f7ccd42ab..291ab2627c 100644 --- a/core/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-H_0.cpp +++ b/core/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-H_0.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h" -const FX_WORD g_FXCMAP_ETen_B5_H_0[254 * 3] = { +const uint16_t g_FXCMAP_ETen_B5_H_0[254 * 3] = { 0x0020, 0x007E, 0x3550, 0xA140, 0xA158, 0x0063, 0xA159, 0xA15C, 0x35AF, 0xA15D, 0xA17E, 0x0080, 0xA1A1, 0xA1F5, 0x00A2, 0xA1F6, 0xA1F6, 0x00F8, 0xA1F7, 0xA1F7, 0x00F7, 0xA1F8, 0xA1FE, 0x00F9, 0xA240, 0xA27E, 0x0100, diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-V_0.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-V_0.cpp index 3de105a413..dfbc1e35ba 100644 --- a/core/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-V_0.cpp +++ b/core/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-V_0.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h" -const FX_WORD g_FXCMAP_ETen_B5_V_0[13 * 3] = { +const uint16_t g_FXCMAP_ETen_B5_V_0[13 * 3] = { 0xA14B, 0xA14B, 0x354E, 0xA15A, 0xA15A, 0x35AF, 0xA15C, 0xA15C, 0x35B1, 0xA15D, 0xA15E, 0x0082, 0xA161, 0xA162, 0x0086, 0xA165, 0xA166, 0x008A, 0xA169, 0xA16A, 0x008E, 0xA16D, 0xA16E, 0x0092, diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-H_0.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-H_0.cpp index 267fee6af8..40fae5086a 100644 --- a/core/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-H_0.cpp +++ b/core/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-H_0.cpp @@ -6,6 +6,6 @@ #include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h" -const FX_WORD g_FXCMAP_ETenms_B5_H_0[1 * 3] = { +const uint16_t g_FXCMAP_ETenms_B5_H_0[1 * 3] = { 0x0020, 0x007E, 0x0001, }; diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-V_0.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-V_0.cpp index 4f555fadba..b7f79e44bb 100644 --- a/core/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-V_0.cpp +++ b/core/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-V_0.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h" -const FX_WORD g_FXCMAP_ETenms_B5_V_0[18 * 3] = { +const uint16_t g_FXCMAP_ETenms_B5_V_0[18 * 3] = { 0xA14B, 0xA14B, 0x354E, 0xA14C, 0xA14C, 0x006D, 0xA156, 0xA156, 0x0138, 0xA158, 0xA158, 0x007A, 0xA15A, 0xA15A, 0x35AF, 0xA15C, 0xA15C, 0x35B1, 0xA15D, 0xA15E, 0x0082, 0xA161, 0xA162, 0x0086, 0xA165, 0xA166, 0x008A, diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-H_5.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-H_5.cpp index 67459a505f..170c33052b 100644 --- a/core/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-H_5.cpp +++ b/core/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-H_5.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h" -const FX_WORD g_FXCMAP_HKscs_B5_H_5[1210 * 3] = { +const uint16_t g_FXCMAP_HKscs_B5_H_5[1210 * 3] = { 0x0020, 0x007E, 0x0001, 0x8740, 0x8765, 0x4A15, 0x8767, 0x8779, 0x4A3B, 0x8840, 0x8855, 0x44C9, 0x8856, 0x887E, 0x4961, 0x88A1, 0x88A8, 0x498A, 0x88A9, 0x88AA, 0x499C, 0x8940, 0x8941, 0x4534, 0x8943, 0x8943, 0x4536, diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-V_5.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-V_5.cpp index d9cbab8826..cfb1817c0d 100644 --- a/core/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-V_5.cpp +++ b/core/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-V_5.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h" -const FX_WORD g_FXCMAP_HKscs_B5_V_5[13 * 3] = { +const uint16_t g_FXCMAP_HKscs_B5_V_5[13 * 3] = { 0xA14B, 0xA14B, 0x354E, 0xA15A, 0xA15A, 0x35AF, 0xA15C, 0xA15C, 0x35B1, 0xA15D, 0xA15E, 0x0082, 0xA161, 0xA162, 0x0086, 0xA165, 0xA166, 0x008A, 0xA169, 0xA16A, 0x008E, 0xA16D, 0xA16E, 0x0092, diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-H_3.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-H_3.cpp index f02c9dc655..64e52de650 100644 --- a/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-H_3.cpp +++ b/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-H_3.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h" -const FX_WORD g_FXCMAP_UniCNS_UCS2_H_3[16418 * 3] = { +const uint16_t g_FXCMAP_UniCNS_UCS2_H_3[16418 * 3] = { 0x0020, 0x007E, 0x0001, 0x00A2, 0x00A3, 0x0106, 0x00A5, 0x00A5, 0x0104, 0x00A7, 0x00A7, 0x00B2, 0x00A8, 0x00A8, 0x35B3, 0x00AC, 0x00AC, 0x36E1, 0x00B0, 0x00B0, 0x0118, 0x00B1, 0x00B1, 0x00D4, 0x00B7, 0x00B7, 0x0073, diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-V_3.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-V_3.cpp index b77835c3f3..e1bb27c2f5 100644 --- a/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-V_3.cpp +++ b/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-V_3.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h" -const FX_WORD g_FXCMAP_UniCNS_UCS2_V_3[13 * 3] = { +const uint16_t g_FXCMAP_UniCNS_UCS2_V_3[13 * 3] = { 0x2013, 0x2013, 0x0078, 0x2014, 0x2014, 0x007A, 0x2025, 0x2025, 0x006D, 0x3008, 0x3009, 0x0096, 0x300A, 0x300B, 0x0092, 0x300C, 0x300D, 0x009A, 0x300E, 0x300F, 0x009E, 0x3010, 0x3011, 0x008E, diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UTF16-H_0.cpp b/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UTF16-H_0.cpp index c30dc46568..5cee7b2f8c 100644 --- a/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UTF16-H_0.cpp +++ b/core/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UTF16-H_0.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h" -const FX_WORD g_FXCMAP_UniCNS_UTF16_H_0[14557 * 2] = { +const uint16_t g_FXCMAP_UniCNS_UTF16_H_0[14557 * 2] = { 0x0020, 0x0001, 0x0021, 0x0002, 0x0022, 0x0003, 0x0023, 0x0004, 0x0024, 0x0005, 0x0025, 0x0006, 0x0026, 0x0007, 0x0027, 0x0008, 0x0028, 0x0009, 0x0029, 0x000A, 0x002A, 0x000B, 0x002B, 0x000C, 0x002C, 0x000D, 0x002D, diff --git a/core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h b/core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h index 249d529b91..bef9f6c04d 100644 --- a/core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h +++ b/core/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h @@ -7,23 +7,23 @@ #ifndef CORE_FPDFAPI_FPDF_CMAPS_CNS1_CMAPS_CNS1_H_ #define CORE_FPDFAPI_FPDF_CMAPS_CNS1_CMAPS_CNS1_H_ -#include "core/include/fxcrt/fx_system.h" // For FX_WORD. +#include <stdint.h> -extern const FX_WORD g_FXCMAP_B5pc_H_0[]; -extern const FX_WORD g_FXCMAP_B5pc_V_0[]; -extern const FX_WORD g_FXCMAP_HKscs_B5_H_5[]; -extern const FX_WORD g_FXCMAP_HKscs_B5_V_5[]; -extern const FX_WORD g_FXCMAP_ETen_B5_H_0[]; -extern const FX_WORD g_FXCMAP_ETen_B5_V_0[]; -extern const FX_WORD g_FXCMAP_ETenms_B5_H_0[]; -extern const FX_WORD g_FXCMAP_ETenms_B5_V_0[]; -extern const FX_WORD g_FXCMAP_CNS_EUC_H_0[]; -extern const FX_WORD g_FXCMAP_CNS_EUC_H_0_DWord[]; -extern const FX_WORD g_FXCMAP_CNS_EUC_V_0[]; -extern const FX_WORD g_FXCMAP_CNS_EUC_V_0_DWord[]; -extern const FX_WORD g_FXCMAP_UniCNS_UCS2_H_3[]; -extern const FX_WORD g_FXCMAP_UniCNS_UCS2_V_3[]; -extern const FX_WORD g_FXCMAP_UniCNS_UTF16_H_0[]; -extern const FX_WORD g_FXCMAP_CNS1CID2Unicode_5[]; +extern const uint16_t g_FXCMAP_B5pc_H_0[]; +extern const uint16_t g_FXCMAP_B5pc_V_0[]; +extern const uint16_t g_FXCMAP_HKscs_B5_H_5[]; +extern const uint16_t g_FXCMAP_HKscs_B5_V_5[]; +extern const uint16_t g_FXCMAP_ETen_B5_H_0[]; +extern const uint16_t g_FXCMAP_ETen_B5_V_0[]; +extern const uint16_t g_FXCMAP_ETenms_B5_H_0[]; +extern const uint16_t g_FXCMAP_ETenms_B5_V_0[]; +extern const uint16_t g_FXCMAP_CNS_EUC_H_0[]; +extern const uint16_t g_FXCMAP_CNS_EUC_H_0_DWord[]; +extern const uint16_t g_FXCMAP_CNS_EUC_V_0[]; +extern const uint16_t g_FXCMAP_CNS_EUC_V_0_DWord[]; +extern const uint16_t g_FXCMAP_UniCNS_UCS2_H_3[]; +extern const uint16_t g_FXCMAP_UniCNS_UCS2_V_3[]; +extern const uint16_t g_FXCMAP_UniCNS_UTF16_H_0[]; +extern const uint16_t g_FXCMAP_CNS1CID2Unicode_5[]; #endif // CORE_FPDFAPI_FPDF_CMAPS_CNS1_CMAPS_CNS1_H_ diff --git a/core/fpdfapi/fpdf_cmaps/GB1/Adobe-GB1-UCS2_5.cpp b/core/fpdfapi/fpdf_cmaps/GB1/Adobe-GB1-UCS2_5.cpp index c6e5752ede..a7468964f9 100644 --- a/core/fpdfapi/fpdf_cmaps/GB1/Adobe-GB1-UCS2_5.cpp +++ b/core/fpdfapi/fpdf_cmaps/GB1/Adobe-GB1-UCS2_5.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h" -const FX_WORD g_FXCMAP_GB1CID2Unicode_5[30284] = { +const uint16_t g_FXCMAP_GB1CID2Unicode_5[30284] = { 0xFFFD, 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F, 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, diff --git a/core/fpdfapi/fpdf_cmaps/GB1/GB-EUC-H_0.cpp b/core/fpdfapi/fpdf_cmaps/GB1/GB-EUC-H_0.cpp index 0485aee635..bf4f12f04b 100644 --- a/core/fpdfapi/fpdf_cmaps/GB1/GB-EUC-H_0.cpp +++ b/core/fpdfapi/fpdf_cmaps/GB1/GB-EUC-H_0.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h" -const FX_WORD g_FXCMAP_GB_EUC_H_0[90 * 3] = { +const uint16_t g_FXCMAP_GB_EUC_H_0[90 * 3] = { 0x0020, 0x0020, 0x1E24, 0x0021, 0x007E, 0x032E, 0xA1A1, 0xA1FE, 0x0060, 0xA2B1, 0xA2E2, 0x00BE, 0xA2E5, 0xA2EE, 0x00F0, 0xA2F1, 0xA2FC, 0x00FA, 0xA3A1, 0xA3FE, 0x0106, 0xA4A1, 0xA4F3, 0x0164, 0xA5A1, 0xA5F6, 0x01B7, diff --git a/core/fpdfapi/fpdf_cmaps/GB1/GB-EUC-V_0.cpp b/core/fpdfapi/fpdf_cmaps/GB1/GB-EUC-V_0.cpp index 274d0d2fd2..dd4e0b8742 100644 --- a/core/fpdfapi/fpdf_cmaps/GB1/GB-EUC-V_0.cpp +++ b/core/fpdfapi/fpdf_cmaps/GB1/GB-EUC-V_0.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h" -const FX_WORD g_FXCMAP_GB_EUC_V_0[20 * 3] = { +const uint16_t g_FXCMAP_GB_EUC_V_0[20 * 3] = { 0xA1A2, 0xA1A2, 0x023F, 0xA1A3, 0xA1A3, 0x023E, 0xA1AA, 0xA1AA, 0x0256, 0xA1AB, 0xA1AC, 0x1E18, 0xA1AD, 0xA1AD, 0x0257, 0xA1B2, 0xA1BF, 0x0246, 0xA1FE, 0xA1FE, 0x1E1A, 0xA3A1, 0xA3A1, 0x0242, 0xA3A8, 0xA3A9, 0x0244, diff --git a/core/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-H_2.cpp b/core/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-H_2.cpp index 7f668947b5..ed68358705 100644 --- a/core/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-H_2.cpp +++ b/core/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-H_2.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h" -const FX_WORD g_FXCMAP_GBK_EUC_H_2[4071 * 3] = { +const uint16_t g_FXCMAP_GBK_EUC_H_2[4071 * 3] = { 0x0020, 0x0020, 0x1E24, 0x0021, 0x007E, 0x032E, 0x8140, 0x8178, 0x2758, 0x8179, 0x8179, 0x2059, 0x817A, 0x817E, 0x2791, 0x8180, 0x8185, 0x2796, 0x8186, 0x8186, 0x21F1, 0x8187, 0x81EC, 0x279C, 0x81ED, 0x81ED, 0x1FF2, diff --git a/core/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-V_2.cpp b/core/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-V_2.cpp index ec35055da5..5c993f8b4d 100644 --- a/core/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-V_2.cpp +++ b/core/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-V_2.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h" -const FX_WORD g_FXCMAP_GBK_EUC_V_2[20 * 3] = { +const uint16_t g_FXCMAP_GBK_EUC_V_2[20 * 3] = { 0xA1A2, 0xA1A2, 0x023F, 0xA1A3, 0xA1A3, 0x023E, 0xA1AA, 0xA1AA, 0x0256, 0xA1AB, 0xA1AC, 0x1E18, 0xA1AD, 0xA1AD, 0x0257, 0xA1B2, 0xA1BF, 0x0246, 0xA1FE, 0xA1FE, 0x1E1A, 0xA3A1, 0xA3A1, 0x0242, 0xA3A8, 0xA3A9, 0x0244, diff --git a/core/fpdfapi/fpdf_cmaps/GB1/GBK2K-H_5.cpp b/core/fpdfapi/fpdf_cmaps/GB1/GBK2K-H_5.cpp index bd0b1be516..7ad5864c9d 100644 --- a/core/fpdfapi/fpdf_cmaps/GB1/GBK2K-H_5.cpp +++ b/core/fpdfapi/fpdf_cmaps/GB1/GBK2K-H_5.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h" -const FX_WORD g_FXCMAP_GBK2K_H_5[4071 * 3] = { +const uint16_t g_FXCMAP_GBK2K_H_5[4071 * 3] = { 0x0020, 0x007E, 0x0001, 0x8140, 0x8178, 0x2758, 0x8179, 0x8179, 0x2059, 0x817A, 0x817E, 0x2791, 0x8180, 0x8185, 0x2796, 0x8186, 0x8186, 0x21F1, 0x8187, 0x81EC, 0x279C, 0x81ED, 0x81ED, 0x1FF2, 0x81EE, 0x81F5, 0x2802, @@ -1366,7 +1366,7 @@ const FX_WORD g_FXCMAP_GBK2K_H_5[4071 * 3] = { 0xFE40, 0xFE40, 0x1259, 0xFE41, 0xFE7E, 0x5610, 0xFE80, 0xFEA0, 0x564E, }; -const FX_WORD g_FXCMAP_GBK2K_H_5_DWord[1017 * 4] = { +const uint16_t g_FXCMAP_GBK2K_H_5_DWord[1017 * 4] = { 0x8130, 0x8436, 0x8436, 0x5752, 0x8138, 0xFD38, 0xFD39, 0x579C, 0x8138, 0xFE30, 0xFE39, 0x579E, 0x8139, 0x8130, 0x8137, 0x57A8, 0x8139, 0x8139, 0x8139, 0x57B0, 0x8139, 0x8230, 0x8239, 0x57B1, 0x8139, 0x8330, 0x8339, diff --git a/core/fpdfapi/fpdf_cmaps/GB1/GBK2K-V_5.cpp b/core/fpdfapi/fpdf_cmaps/GB1/GBK2K-V_5.cpp index 5e66e43b7e..0445263e02 100644 --- a/core/fpdfapi/fpdf_cmaps/GB1/GBK2K-V_5.cpp +++ b/core/fpdfapi/fpdf_cmaps/GB1/GBK2K-V_5.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h" -const FX_WORD g_FXCMAP_GBK2K_V_5[41 * 3] = { +const uint16_t g_FXCMAP_GBK2K_V_5[41 * 3] = { 0xA1A2, 0xA1A2, 0x023F, 0xA1A3, 0xA1A3, 0x023E, 0xA1AA, 0xA1AA, 0x0256, 0xA1AB, 0xA1AC, 0x1E18, 0xA1AD, 0xA1AD, 0x0257, 0xA1B2, 0xA1BF, 0x0246, 0xA1FE, 0xA1FE, 0x1E1A, 0xA3A1, 0xA3A1, 0x0242, 0xA3A8, 0xA3A9, 0x0244, diff --git a/core/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-H_2.cpp b/core/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-H_2.cpp index 540e7b6c2a..44a5b7f8a1 100644 --- a/core/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-H_2.cpp +++ b/core/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-H_2.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h" -const FX_WORD g_FXCMAP_GBKp_EUC_H_2[4070 * 3] = { +const uint16_t g_FXCMAP_GBKp_EUC_H_2[4070 * 3] = { 0x0020, 0x007E, 0x0001, 0x8140, 0x8178, 0x2758, 0x8179, 0x8179, 0x2059, 0x817A, 0x817E, 0x2791, 0x8180, 0x8185, 0x2796, 0x8186, 0x8186, 0x21F1, 0x8187, 0x81EC, 0x279C, 0x81ED, 0x81ED, 0x1FF2, 0x81EE, 0x81F5, 0x2802, diff --git a/core/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-V_2.cpp b/core/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-V_2.cpp index 8c8b3d5c92..c9aac3d3ff 100644 --- a/core/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-V_2.cpp +++ b/core/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-V_2.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h" -const FX_WORD g_FXCMAP_GBKp_EUC_V_2[20 * 3] = { +const uint16_t g_FXCMAP_GBKp_EUC_V_2[20 * 3] = { 0xA1A2, 0xA1A2, 0x023F, 0xA1A3, 0xA1A3, 0x023E, 0xA1AA, 0xA1AA, 0x0256, 0xA1AB, 0xA1AC, 0x1E18, 0xA1AD, 0xA1AD, 0x0257, 0xA1B2, 0xA1BF, 0x0246, 0xA1FE, 0xA1FE, 0x1E1A, 0xA3A1, 0xA3A1, 0x0242, 0xA3A8, 0xA3A9, 0x0244, diff --git a/core/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-H_0.cpp b/core/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-H_0.cpp index 0fab35577c..4553f7ca1e 100644 --- a/core/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-H_0.cpp +++ b/core/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-H_0.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h" -const FX_WORD g_FXCMAP_GBpc_EUC_H_0[91 * 3] = { +const uint16_t g_FXCMAP_GBpc_EUC_H_0[91 * 3] = { 0x0020, 0x007E, 0x0001, 0x0080, 0x0080, 0x1E20, 0x00FD, 0x00FF, 0x1E21, 0xA1A1, 0xA1FE, 0x0060, 0xA2B1, 0xA2E2, 0x00BE, 0xA2E5, 0xA2EE, 0x00F0, 0xA2F1, 0xA2FC, 0x00FA, 0xA3A1, 0xA3FE, 0x0106, 0xA4A1, 0xA4F3, 0x0164, diff --git a/core/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-V_0.cpp b/core/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-V_0.cpp index c07c8a18c0..70cacb5546 100644 --- a/core/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-V_0.cpp +++ b/core/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-V_0.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h" -const FX_WORD g_FXCMAP_GBpc_EUC_V_0[20 * 3] = { +const uint16_t g_FXCMAP_GBpc_EUC_V_0[20 * 3] = { 0xA1A2, 0xA1A2, 0x023F, 0xA1A3, 0xA1A3, 0x023E, 0xA1AA, 0xA1AA, 0x0256, 0xA1AB, 0xA1AC, 0x1E18, 0xA1AD, 0xA1AD, 0x0257, 0xA1B2, 0xA1BF, 0x0246, 0xA1FE, 0xA1FE, 0x1E1A, 0xA3A1, 0xA3A1, 0x0242, 0xA3A8, 0xA3A9, 0x0244, diff --git a/core/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-H_4.cpp b/core/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-H_4.cpp index 60e109f864..e01692f36a 100644 --- a/core/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-H_4.cpp +++ b/core/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-H_4.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h" -const FX_WORD g_FXCMAP_UniGB_UCS2_H_4[13825 * 3] = { +const uint16_t g_FXCMAP_UniGB_UCS2_H_4[13825 * 3] = { 0x0020, 0x007E, 0x0001, 0x00A4, 0x00A4, 0x00A7, 0x00A5, 0x00A5, 0x5752, 0x00A7, 0x00A7, 0x00AB, 0x00A8, 0x00A8, 0x0066, 0x00B0, 0x00B0, 0x00A2, 0x00B1, 0x00B1, 0x007F, 0x00D7, 0x00D7, 0x0080, 0x00E0, 0x00E0, 0x029F, diff --git a/core/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-V_4.cpp b/core/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-V_4.cpp index 5d53067e26..1889171420 100644 --- a/core/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-V_4.cpp +++ b/core/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-V_4.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h" -const FX_WORD g_FXCMAP_UniGB_UCS2_V_4[24 * 3] = { +const uint16_t g_FXCMAP_UniGB_UCS2_V_4[24 * 3] = { 0x2014, 0x2014, 0x0256, 0x2026, 0x2026, 0x0257, 0x2225, 0x2225, 0x1E1C, 0x3001, 0x3001, 0x023F, 0x3002, 0x3002, 0x023E, 0x3008, 0x300F, 0x0248, 0x3010, 0x3011, 0x0252, 0x3013, 0x3013, 0x1E1A, 0x3014, 0x3015, 0x0246, diff --git a/core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h b/core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h index 348783de9d..e80809897d 100644 --- a/core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h +++ b/core/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h @@ -7,21 +7,21 @@ #ifndef CORE_FPDFAPI_FPDF_CMAPS_GB1_CMAPS_GB1_H_ #define CORE_FPDFAPI_FPDF_CMAPS_GB1_CMAPS_GB1_H_ -#include "core/include/fxcrt/fx_system.h" // For FX_WORD. +#include <stdint.h> -extern const FX_WORD g_FXCMAP_GB_EUC_H_0[]; -extern const FX_WORD g_FXCMAP_GB_EUC_V_0[]; -extern const FX_WORD g_FXCMAP_GBpc_EUC_H_0[]; -extern const FX_WORD g_FXCMAP_GBpc_EUC_V_0[]; -extern const FX_WORD g_FXCMAP_GBK_EUC_H_2[]; -extern const FX_WORD g_FXCMAP_GBK_EUC_V_2[]; -extern const FX_WORD g_FXCMAP_GBKp_EUC_H_2[]; -extern const FX_WORD g_FXCMAP_GBKp_EUC_V_2[]; -extern const FX_WORD g_FXCMAP_GBK2K_H_5[]; -extern const FX_WORD g_FXCMAP_GBK2K_H_5_DWord[]; -extern const FX_WORD g_FXCMAP_GBK2K_V_5[]; -extern const FX_WORD g_FXCMAP_UniGB_UCS2_H_4[]; -extern const FX_WORD g_FXCMAP_UniGB_UCS2_V_4[]; -extern const FX_WORD g_FXCMAP_GB1CID2Unicode_5[]; +extern const uint16_t g_FXCMAP_GB_EUC_H_0[]; +extern const uint16_t g_FXCMAP_GB_EUC_V_0[]; +extern const uint16_t g_FXCMAP_GBpc_EUC_H_0[]; +extern const uint16_t g_FXCMAP_GBpc_EUC_V_0[]; +extern const uint16_t g_FXCMAP_GBK_EUC_H_2[]; +extern const uint16_t g_FXCMAP_GBK_EUC_V_2[]; +extern const uint16_t g_FXCMAP_GBKp_EUC_H_2[]; +extern const uint16_t g_FXCMAP_GBKp_EUC_V_2[]; +extern const uint16_t g_FXCMAP_GBK2K_H_5[]; +extern const uint16_t g_FXCMAP_GBK2K_H_5_DWord[]; +extern const uint16_t g_FXCMAP_GBK2K_V_5[]; +extern const uint16_t g_FXCMAP_UniGB_UCS2_H_4[]; +extern const uint16_t g_FXCMAP_UniGB_UCS2_V_4[]; +extern const uint16_t g_FXCMAP_GB1CID2Unicode_5[]; #endif // CORE_FPDFAPI_FPDF_CMAPS_GB1_CMAPS_GB1_H_ diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/83pv-RKSJ-H_1.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/83pv-RKSJ-H_1.cpp index 19b3976a07..e3ac795e98 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/83pv-RKSJ-H_1.cpp +++ b/core/fpdfapi/fpdf_cmaps/Japan1/83pv-RKSJ-H_1.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h" -const FX_WORD g_FXCMAP_83pv_RKSJ_H_1[222 * 3] = { +const uint16_t g_FXCMAP_83pv_RKSJ_H_1[222 * 3] = { 0x0020, 0x007E, 0x0001, 0x0080, 0x0080, 0x0061, 0x00A0, 0x00DF, 0x0146, 0x00FD, 0x00FD, 0x0098, 0x00FE, 0x00FE, 0x00E4, 0x00FF, 0x00FF, 0x007C, 0x8140, 0x817E, 0x0279, 0x8180, 0x81AC, 0x02B8, 0x81B8, 0x81BF, 0x02E5, diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-H_2.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-H_2.cpp index d38111784e..485b6a8500 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-H_2.cpp +++ b/core/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-H_2.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h" -const FX_WORD g_FXCMAP_90ms_RKSJ_H_2[171 * 3] = { +const uint16_t g_FXCMAP_90ms_RKSJ_H_2[171 * 3] = { 0x0020, 0x007D, 0x00E7, 0x007E, 0x007E, 0x0277, 0x00A0, 0x00DF, 0x0146, 0x8140, 0x817E, 0x0279, 0x8180, 0x81AC, 0x02B8, 0x81B8, 0x81BF, 0x02E5, 0x81C8, 0x81CE, 0x02ED, 0x81DA, 0x81E8, 0x02F4, 0x81F0, 0x81F7, 0x0303, diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-V_2.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-V_2.cpp index 31a9ae55e2..19716da07d 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-V_2.cpp +++ b/core/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-V_2.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h" -const FX_WORD g_FXCMAP_90ms_RKSJ_V_2[78 * 3] = { +const uint16_t g_FXCMAP_90ms_RKSJ_V_2[78 * 3] = { 0x8141, 0x8142, 0x1ECF, 0x8143, 0x8143, 0x204C, 0x8144, 0x8144, 0x2052, 0x8150, 0x8151, 0x1ED1, 0x815B, 0x815D, 0x1ED3, 0x8160, 0x8164, 0x1ED6, 0x8169, 0x817A, 0x1EDB, 0x8181, 0x8181, 0x1EED, 0x81A8, 0x81A8, 0x02E3, diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-H_2.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-H_2.cpp index dd930ea66d..471a0ef776 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-H_2.cpp +++ b/core/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-H_2.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h" -const FX_WORD g_FXCMAP_90msp_RKSJ_H_2[170 * 3] = { +const uint16_t g_FXCMAP_90msp_RKSJ_H_2[170 * 3] = { 0x0020, 0x007E, 0x0001, 0x00A0, 0x00DF, 0x0146, 0x8140, 0x817E, 0x0279, 0x8180, 0x81AC, 0x02B8, 0x81B8, 0x81BF, 0x02E5, 0x81C8, 0x81CE, 0x02ED, 0x81DA, 0x81E8, 0x02F4, 0x81F0, 0x81F7, 0x0303, 0x81FC, 0x81FC, 0x030B, diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-V_2.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-V_2.cpp index a9731c4f8a..4aff86612c 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-V_2.cpp +++ b/core/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-V_2.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h" -const FX_WORD g_FXCMAP_90msp_RKSJ_V_2[78 * 3] = { +const uint16_t g_FXCMAP_90msp_RKSJ_V_2[78 * 3] = { 0x8141, 0x8142, 0x1ECF, 0x8143, 0x8143, 0x204C, 0x8144, 0x8144, 0x2052, 0x8150, 0x8151, 0x1ED1, 0x815B, 0x815D, 0x1ED3, 0x8160, 0x8164, 0x1ED6, 0x8169, 0x817A, 0x1EDB, 0x8181, 0x8181, 0x1EED, 0x81A8, 0x81A8, 0x02E3, diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/90pv-RKSJ-H_1.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/90pv-RKSJ-H_1.cpp index 331e75614c..61890ad2d7 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/90pv-RKSJ-H_1.cpp +++ b/core/fpdfapi/fpdf_cmaps/Japan1/90pv-RKSJ-H_1.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h" -const FX_WORD g_FXCMAP_90pv_RKSJ_H_1[263 * 3] = { +const uint16_t g_FXCMAP_90pv_RKSJ_H_1[263 * 3] = { 0x0020, 0x007E, 0x0001, 0x0080, 0x0080, 0x0061, 0x00A0, 0x00DF, 0x0146, 0x00FD, 0x00FD, 0x0098, 0x00FE, 0x00FE, 0x00E4, 0x00FF, 0x00FF, 0x007C, 0x8140, 0x817E, 0x0279, 0x8180, 0x81AC, 0x02B8, 0x81B8, 0x81BF, 0x02E5, diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-H_1.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-H_1.cpp index ee3027a526..1034dd9713 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-H_1.cpp +++ b/core/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-H_1.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h" -const FX_WORD g_FXCMAP_Add_RKSJ_H_1[635 * 3] = { +const uint16_t g_FXCMAP_Add_RKSJ_H_1[635 * 3] = { 0x0020, 0x007E, 0x00E7, 0x00A0, 0x00DF, 0x0146, 0x8140, 0x817E, 0x0279, 0x8180, 0x81AC, 0x02B8, 0x81B8, 0x81BF, 0x02E5, 0x81C8, 0x81CE, 0x02ED, 0x81DA, 0x81E8, 0x02F4, 0x81F0, 0x81F7, 0x0303, 0x81FC, 0x81FC, 0x030B, diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-V_1.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-V_1.cpp index b23057f738..8c3eee5843 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-V_1.cpp +++ b/core/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-V_1.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h" -const FX_WORD g_FXCMAP_Add_RKSJ_V_1[57 * 3] = { +const uint16_t g_FXCMAP_Add_RKSJ_V_1[57 * 3] = { 0x8141, 0x8142, 0x1ECF, 0x8143, 0x8143, 0x204C, 0x8144, 0x8144, 0x2052, 0x8150, 0x8151, 0x1ED1, 0x815B, 0x815D, 0x1ED3, 0x8160, 0x8164, 0x1ED6, 0x8165, 0x8165, 0x205A, 0x8166, 0x8166, 0x2053, 0x8167, 0x8167, 0x2058, diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/Adobe-Japan1-UCS2_4.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/Adobe-Japan1-UCS2_4.cpp index 6be7bbfe5c..2f127aa9f1 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/Adobe-Japan1-UCS2_4.cpp +++ b/core/fpdfapi/fpdf_cmaps/Japan1/Adobe-Japan1-UCS2_4.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h" -const FX_WORD g_FXCMAP_Japan1CID2Unicode_4[15444] = { +const uint16_t g_FXCMAP_Japan1CID2Unicode_4[15444] = { 0xFFFD, 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F, 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/EUC-H_1.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/EUC-H_1.cpp index e729ebf90c..fc8c7913d8 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/EUC-H_1.cpp +++ b/core/fpdfapi/fpdf_cmaps/Japan1/EUC-H_1.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h" -const FX_WORD g_FXCMAP_EUC_H_1[120 * 3] = { +const uint16_t g_FXCMAP_EUC_H_1[120 * 3] = { 0x0020, 0x007E, 0x00E7, 0x8EA0, 0x8EDF, 0x0146, 0xA1A1, 0xA1FE, 0x0279, 0xA2A1, 0xA2AE, 0x02D7, 0xA2BA, 0xA2C1, 0x02E5, 0xA2CA, 0xA2D0, 0x02ED, 0xA2DC, 0xA2EA, 0x02F4, 0xA2F2, 0xA2F9, 0x0303, 0xA2FE, 0xA2FE, 0x030B, diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/EUC-V_1.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/EUC-V_1.cpp index af095bc570..b5b72fedde 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/EUC-V_1.cpp +++ b/core/fpdfapi/fpdf_cmaps/Japan1/EUC-V_1.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h" -const FX_WORD g_FXCMAP_EUC_V_1[27 * 3] = { +const uint16_t g_FXCMAP_EUC_V_1[27 * 3] = { 0xA1A2, 0xA1A3, 0x1ECF, 0xA1B1, 0xA1B2, 0x1ED1, 0xA1BC, 0xA1BE, 0x1ED3, 0xA1C1, 0xA1C5, 0x1ED6, 0xA1CA, 0xA1DB, 0x1EDB, 0xA1E1, 0xA1E1, 0x1EED, 0xA4A1, 0xA4A1, 0x1EEE, 0xA4A3, 0xA4A3, 0x1EEF, 0xA4A5, 0xA4A5, 0x1EF0, diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-H_2.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-H_2.cpp index f4399cbdea..aed4cd992b 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-H_2.cpp +++ b/core/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-H_2.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h" -const FX_WORD g_FXCMAP_Ext_RKSJ_H_2[665 * 3] = { +const uint16_t g_FXCMAP_Ext_RKSJ_H_2[665 * 3] = { 0x0020, 0x007E, 0x00E7, 0x00A0, 0x00DF, 0x0146, 0x8140, 0x817E, 0x0279, 0x8180, 0x8188, 0x02B8, 0x8189, 0x8189, 0x1D36, 0x818A, 0x81AC, 0x02C2, 0x824F, 0x8258, 0x030C, 0x8260, 0x8279, 0x0316, 0x8281, 0x829A, 0x0330, diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-V_2.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-V_2.cpp index f3dbea981c..06cc2fecc1 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-V_2.cpp +++ b/core/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-V_2.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h" -const FX_WORD g_FXCMAP_Ext_RKSJ_V_2[39 * 3] = { +const uint16_t g_FXCMAP_Ext_RKSJ_V_2[39 * 3] = { 0x8141, 0x8142, 0x1ECF, 0x8143, 0x8143, 0x204C, 0x8144, 0x8144, 0x2052, 0x814A, 0x814A, 0x2050, 0x814B, 0x814B, 0x204F, 0x815B, 0x815D, 0x1ED3, 0x8160, 0x8164, 0x1ED6, 0x8165, 0x8165, 0x2059, 0x8166, 0x8166, 0x2054, diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/H_1.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/H_1.cpp index 2905a5896b..082c1fadf1 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/H_1.cpp +++ b/core/fpdfapi/fpdf_cmaps/Japan1/H_1.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h" -const FX_WORD g_FXCMAP_H_1[118 * 3] = { +const uint16_t g_FXCMAP_H_1[118 * 3] = { 0x2121, 0x217E, 0x0279, 0x2221, 0x222E, 0x02D7, 0x223A, 0x2241, 0x02E5, 0x224A, 0x2250, 0x02ED, 0x225C, 0x226A, 0x02F4, 0x2272, 0x2279, 0x0303, 0x227E, 0x227E, 0x030B, 0x2330, 0x2339, 0x030C, 0x2341, 0x235A, 0x0316, diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-H_4.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-H_4.cpp index ac3ae2f82c..9137660760 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-H_4.cpp +++ b/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-H_4.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h" -const FX_WORD g_FXCMAP_UniJIS_UCS2_HW_H_4[4 * 3] = { +const uint16_t g_FXCMAP_UniJIS_UCS2_HW_H_4[4 * 3] = { 0x0020, 0x005B, 0x00E7, 0x005C, 0x005C, 0x220F, 0x005D, 0x007E, 0x0124, 0x00A5, 0x00A5, 0x0123, }; diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-V_4.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-V_4.cpp index 2753934fc2..0df6fb3019 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-V_4.cpp +++ b/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-V_4.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h" -const FX_WORD g_FXCMAP_UniJIS_UCS2_HW_V_4[199 * 3] = { +const uint16_t g_FXCMAP_UniJIS_UCS2_HW_V_4[199 * 3] = { 0x0020, 0x005B, 0x00E7, 0x005C, 0x005C, 0x220F, 0x005D, 0x007E, 0x0124, 0x00A5, 0x00A5, 0x0123, 0x00B0, 0x00B0, 0x204D, 0x2010, 0x2010, 0x1ED5, 0x2015, 0x2015, 0x1ED4, 0x2016, 0x2016, 0x1ED7, 0x2018, 0x2019, 0x2059, diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-H_4.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-H_4.cpp index 9c1387a185..03af2e8aee 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-H_4.cpp +++ b/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-H_4.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h" -const FX_WORD g_FXCMAP_UniJIS_UCS2_H_4[9772 * 2] = { +const uint16_t g_FXCMAP_UniJIS_UCS2_H_4[9772 * 2] = { 0x0020, 0x0001, 0x0021, 0x0002, 0x0022, 0x0003, 0x0023, 0x0004, 0x0024, 0x0005, 0x0025, 0x0006, 0x0026, 0x0007, 0x0027, 0x0008, 0x0028, 0x0009, 0x0029, 0x000A, 0x002A, 0x000B, 0x002B, 0x000C, 0x002C, 0x000D, 0x002D, diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-V_4.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-V_4.cpp index fc0375cb20..715ceb09c0 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-V_4.cpp +++ b/core/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-V_4.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h" -const FX_WORD g_FXCMAP_UniJIS_UCS2_V_4[251 * 2] = { +const uint16_t g_FXCMAP_UniJIS_UCS2_V_4[251 * 2] = { 0x00B0, 0x204D, 0x2010, 0x1ED5, 0x2015, 0x1ED4, 0x2016, 0x1ED7, 0x2018, 0x2059, 0x2019, 0x205A, 0x201C, 0x2057, 0x201D, 0x2058, 0x2025, 0x1EDA, 0x2026, 0x1ED9, 0x2032, 0x2051, 0x2033, 0x205B, 0x2190, 0x02E2, 0x2191, diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/V_1.cpp b/core/fpdfapi/fpdf_cmaps/Japan1/V_1.cpp index 1c5663e3d9..85adc38cbb 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/V_1.cpp +++ b/core/fpdfapi/fpdf_cmaps/Japan1/V_1.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h" -const FX_WORD g_FXCMAP_V_1[27 * 3] = { +const uint16_t g_FXCMAP_V_1[27 * 3] = { 0x2122, 0x2123, 0x1ECF, 0x2131, 0x2132, 0x1ED1, 0x213C, 0x213E, 0x1ED3, 0x2141, 0x2145, 0x1ED6, 0x214A, 0x215B, 0x1EDB, 0x2161, 0x2161, 0x1EED, 0x2421, 0x2421, 0x1EEE, 0x2423, 0x2423, 0x1EEF, 0x2425, 0x2425, 0x1EF0, diff --git a/core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h b/core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h index 851dbde44e..d871735942 100644 --- a/core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h +++ b/core/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h @@ -7,29 +7,29 @@ #ifndef CORE_FPDFAPI_FPDF_CMAPS_JAPAN1_CMAPS_JAPAN1_H_ #define CORE_FPDFAPI_FPDF_CMAPS_JAPAN1_CMAPS_JAPAN1_H_ -#include "core/include/fxcrt/fx_system.h" // For FX_WORD. +#include <stdint.h> -extern const FX_WORD g_FXCMAP_83pv_RKSJ_H_1[]; -extern const FX_WORD g_FXCMAP_90ms_RKSJ_H_2[]; -extern const FX_WORD g_FXCMAP_90ms_RKSJ_V_2[]; -extern const FX_WORD g_FXCMAP_90msp_RKSJ_H_2[]; -extern const FX_WORD g_FXCMAP_90msp_RKSJ_V_2[]; -extern const FX_WORD g_FXCMAP_90pv_RKSJ_H_1[]; -extern const FX_WORD g_FXCMAP_Add_RKSJ_H_1[]; -extern const FX_WORD g_FXCMAP_Add_RKSJ_V_1[]; -extern const FX_WORD g_FXCMAP_EUC_H_1[]; -extern const FX_WORD g_FXCMAP_EUC_V_1[]; -extern const FX_WORD g_FXCMAP_Ext_RKSJ_H_2[]; -extern const FX_WORD g_FXCMAP_Ext_RKSJ_V_2[]; -extern const FX_WORD g_FXCMAP_H_1[]; -extern const FX_WORD g_FXCMAP_V_1[]; -extern const FX_WORD g_FXCMAP_UniJIS_UCS2_H_4[]; -extern const FX_WORD g_FXCMAP_UniJIS_UCS2_V_4[]; -extern const FX_WORD g_FXCMAP_UniJIS_UCS2_HW_H_4[]; -extern const FX_WORD g_FXCMAP_UniJIS_UCS2_HW_V_4[]; -extern const FX_WORD g_FXCMAP_UniJIS_UTF16_H_0[]; -extern const FX_WORD g_FXCMAP_UniJIS_UTF16_H_0_DWord[]; -extern const FX_WORD g_FXCMAP_UniJIS_UTF16_V_0[]; -extern const FX_WORD g_FXCMAP_Japan1CID2Unicode_4[]; +extern const uint16_t g_FXCMAP_83pv_RKSJ_H_1[]; +extern const uint16_t g_FXCMAP_90ms_RKSJ_H_2[]; +extern const uint16_t g_FXCMAP_90ms_RKSJ_V_2[]; +extern const uint16_t g_FXCMAP_90msp_RKSJ_H_2[]; +extern const uint16_t g_FXCMAP_90msp_RKSJ_V_2[]; +extern const uint16_t g_FXCMAP_90pv_RKSJ_H_1[]; +extern const uint16_t g_FXCMAP_Add_RKSJ_H_1[]; +extern const uint16_t g_FXCMAP_Add_RKSJ_V_1[]; +extern const uint16_t g_FXCMAP_EUC_H_1[]; +extern const uint16_t g_FXCMAP_EUC_V_1[]; +extern const uint16_t g_FXCMAP_Ext_RKSJ_H_2[]; +extern const uint16_t g_FXCMAP_Ext_RKSJ_V_2[]; +extern const uint16_t g_FXCMAP_H_1[]; +extern const uint16_t g_FXCMAP_V_1[]; +extern const uint16_t g_FXCMAP_UniJIS_UCS2_H_4[]; +extern const uint16_t g_FXCMAP_UniJIS_UCS2_V_4[]; +extern const uint16_t g_FXCMAP_UniJIS_UCS2_HW_H_4[]; +extern const uint16_t g_FXCMAP_UniJIS_UCS2_HW_V_4[]; +extern const uint16_t g_FXCMAP_UniJIS_UTF16_H_0[]; +extern const uint16_t g_FXCMAP_UniJIS_UTF16_H_0_DWord[]; +extern const uint16_t g_FXCMAP_UniJIS_UTF16_V_0[]; +extern const uint16_t g_FXCMAP_Japan1CID2Unicode_4[]; #endif // CORE_FPDFAPI_FPDF_CMAPS_JAPAN1_CMAPS_JAPAN1_H_ diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/Adobe-Korea1-UCS2_2.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/Adobe-Korea1-UCS2_2.cpp index 71c065375e..80c6caacc4 100644 --- a/core/fpdfapi/fpdf_cmaps/Korea1/Adobe-Korea1-UCS2_2.cpp +++ b/core/fpdfapi/fpdf_cmaps/Korea1/Adobe-Korea1-UCS2_2.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h" -const FX_WORD g_FXCMAP_Korea1CID2Unicode_2[18352] = { +const uint16_t g_FXCMAP_Korea1CID2Unicode_2[18352] = { 0xFFFD, 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F, 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-H_0.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-H_0.cpp index 93349291d7..6c63a89263 100644 --- a/core/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-H_0.cpp +++ b/core/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-H_0.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h" -const FX_WORD g_FXCMAP_KSC_EUC_H_0[467 * 3] = { +const uint16_t g_FXCMAP_KSC_EUC_H_0[467 * 3] = { 0x0020, 0x007E, 0x1F9E, 0xA1A1, 0xA1FE, 0x0065, 0xA2A1, 0xA2E5, 0x00C3, 0xA3A1, 0xA3FE, 0x0108, 0xA4A1, 0xA4D3, 0x0166, 0xA4D5, 0xA4FE, 0x0199, 0xA5A1, 0xA5AA, 0x01C3, 0xA5B0, 0xA5B9, 0x01CD, 0xA5C1, 0xA5D8, 0x01D7, diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-V_0.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-V_0.cpp index 843ab7c0d1..64d8bb2649 100644 --- a/core/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-V_0.cpp +++ b/core/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-V_0.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h" -const FX_WORD g_FXCMAP_KSC_EUC_V_0[16 * 3] = { +const uint16_t g_FXCMAP_KSC_EUC_V_0[16 * 3] = { 0xA1A2, 0xA1A3, 0x1F78, 0xA1A5, 0xA1A5, 0x1F7A, 0xA1A6, 0xA1A6, 0x2080, 0xA1A9, 0xA1AB, 0x1F7B, 0xA1AD, 0xA1AD, 0x1F7E, 0xA1B2, 0xA1BD, 0x1F7F, 0xA1EB, 0xA1EB, 0x1F8B, 0xA3A1, 0xA3A1, 0x1F8C, diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-H_1.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-H_1.cpp index 4476c3c169..f4c0d0a1a2 100644 --- a/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-H_1.cpp +++ b/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-H_1.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h" -const FX_WORD g_FXCMAP_KSCms_UHC_HW_H_1[675 * 3] = { +const uint16_t g_FXCMAP_KSCms_UHC_HW_H_1[675 * 3] = { 0x0020, 0x007E, 0x1F9E, 0x8141, 0x815A, 0x2475, 0x8161, 0x817A, 0x248F, 0x8181, 0x81FE, 0x24A9, 0x8241, 0x825A, 0x2527, 0x8261, 0x827A, 0x2541, 0x8281, 0x82FE, 0x255B, 0x8341, 0x835A, 0x25D9, 0x8361, 0x837A, 0x25F3, diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-V_1.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-V_1.cpp index 1ebcdd34be..a6e284125c 100644 --- a/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-V_1.cpp +++ b/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-V_1.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h" -const FX_WORD g_FXCMAP_KSCms_UHC_HW_V_1[16 * 3] = { +const uint16_t g_FXCMAP_KSCms_UHC_HW_V_1[16 * 3] = { 0xA1A2, 0xA1A3, 0x1F78, 0xA1A5, 0xA1A5, 0x1F7A, 0xA1A6, 0xA1A6, 0x2080, 0xA1A9, 0xA1AB, 0x1F7B, 0xA1AD, 0xA1AD, 0x1F7E, 0xA1B2, 0xA1BD, 0x1F7F, 0xA1EB, 0xA1EB, 0x1F8B, 0xA3A1, 0xA3A1, 0x1F8C, diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-H_1.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-H_1.cpp index 865b7c6c79..1bec769eeb 100644 --- a/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-H_1.cpp +++ b/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-H_1.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h" -const FX_WORD g_FXCMAP_KSCms_UHC_H_1[675 * 3] = { +const uint16_t g_FXCMAP_KSCms_UHC_H_1[675 * 3] = { 0x0020, 0x007E, 0x0001, 0x8141, 0x815A, 0x2475, 0x8161, 0x817A, 0x248F, 0x8181, 0x81FE, 0x24A9, 0x8241, 0x825A, 0x2527, 0x8261, 0x827A, 0x2541, 0x8281, 0x82FE, 0x255B, 0x8341, 0x835A, 0x25D9, 0x8361, 0x837A, 0x25F3, diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-V_1.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-V_1.cpp index ed55f14c12..ce17fec819 100644 --- a/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-V_1.cpp +++ b/core/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-V_1.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h" -const FX_WORD g_FXCMAP_KSCms_UHC_V_1[16 * 3] = { +const uint16_t g_FXCMAP_KSCms_UHC_V_1[16 * 3] = { 0xA1A2, 0xA1A3, 0x1F78, 0xA1A5, 0xA1A5, 0x1F7A, 0xA1A6, 0xA1A6, 0x2080, 0xA1A9, 0xA1AB, 0x1F7B, 0xA1AD, 0xA1AD, 0x1F7E, 0xA1B2, 0xA1BD, 0x1F7F, 0xA1EB, 0xA1EB, 0x1F8B, 0xA3A1, 0xA3A1, 0x1F8C, diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/KSCpc-EUC-H_0.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/KSCpc-EUC-H_0.cpp index 2fcebc1fb1..4639797059 100644 --- a/core/fpdfapi/fpdf_cmaps/Korea1/KSCpc-EUC-H_0.cpp +++ b/core/fpdfapi/fpdf_cmaps/Korea1/KSCpc-EUC-H_0.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h" -const FX_WORD g_FXCMAP_KSCpc_EUC_H_0[509 * 3] = { +const uint16_t g_FXCMAP_KSCpc_EUC_H_0[509 * 3] = { 0x0020, 0x007E, 0x0001, 0x0081, 0x0083, 0x0060, 0x00FE, 0x00FF, 0x0063, 0xA141, 0xA17D, 0x1FFF, 0xA181, 0xA19A, 0x203C, 0xA19C, 0xA1A0, 0x2056, 0xA1A1, 0xA1A1, 0x0065, 0xA1A2, 0xA1A3, 0x205B, 0xA1A4, 0xA1FE, 0x0068, diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-H_1.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-H_1.cpp index 8bab432fcd..9080deacd1 100644 --- a/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-H_1.cpp +++ b/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-H_1.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h" -const FX_WORD g_FXCMAP_UniKS_UCS2_H_1[8394 * 3] = { +const uint16_t g_FXCMAP_UniKS_UCS2_H_1[8394 * 3] = { 0x0020, 0x007E, 0x0001, 0x00A1, 0x00A1, 0x00D0, 0x00A4, 0x00A4, 0x00D6, 0x00A7, 0x00A7, 0x009B, 0x00A8, 0x00A8, 0x006B, 0x00AA, 0x00AA, 0x029C, 0x00AB, 0x00AB, 0x00B0, 0x00B0, 0x00B0, 0x008A, 0x00B1, 0x00B1, 0x0082, diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-V_1.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-V_1.cpp index 834594d007..3eefc131e0 100644 --- a/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-V_1.cpp +++ b/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-V_1.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h" -const FX_WORD g_FXCMAP_UniKS_UCS2_V_1[18 * 3] = { +const uint16_t g_FXCMAP_UniKS_UCS2_V_1[18 * 3] = { 0x2013, 0x2014, 0x1F7B, 0x2016, 0x2016, 0x1F7D, 0x2025, 0x2025, 0x1F7A, 0x3001, 0x3002, 0x1F78, 0x3008, 0x3011, 0x1F81, 0x3013, 0x3013, 0x1F8B, 0x3014, 0x3015, 0x1F7F, 0xFF01, 0xFF01, 0x1F8C, 0xFF08, 0xFF09, 0x1F8D, diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UTF16-H_0.cpp b/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UTF16-H_0.cpp index 81f0c6ea7e..537eab0a42 100644 --- a/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UTF16-H_0.cpp +++ b/core/fpdfapi/fpdf_cmaps/Korea1/UniKS-UTF16-H_0.cpp @@ -6,7 +6,7 @@ #include "core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h" -const FX_WORD g_FXCMAP_UniKS_UTF16_H_0[158 * 2] = { +const uint16_t g_FXCMAP_UniKS_UTF16_H_0[158 * 2] = { 0x00A9, 0x0062, 0x2010, 0x0061, 0x20A9, 0x0060, 0x2F00, 0x193C, 0x2F04, 0x18EC, 0x2F06, 0x190D, 0x2F08, 0x192B, 0x2F0A, 0x194D, 0x2F0B, 0x1D4B, 0x2F11, 0x10AE, 0x2F12, 0x116A, 0x2F14, 0x143F, 0x2F17, 0x168C, 0x2F18, diff --git a/core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h b/core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h index 0180658422..cca9a59905 100644 --- a/core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h +++ b/core/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h @@ -7,18 +7,18 @@ #ifndef CORE_FPDFAPI_FPDF_CMAPS_KOREA1_CMAPS_KOREA1_H_ #define CORE_FPDFAPI_FPDF_CMAPS_KOREA1_CMAPS_KOREA1_H_ -#include "core/include/fxcrt/fx_system.h" // For FX_WORD. +#include <stdint.h> -extern const FX_WORD g_FXCMAP_KSC_EUC_H_0[]; -extern const FX_WORD g_FXCMAP_KSC_EUC_V_0[]; -extern const FX_WORD g_FXCMAP_KSCms_UHC_H_1[]; -extern const FX_WORD g_FXCMAP_KSCms_UHC_V_1[]; -extern const FX_WORD g_FXCMAP_KSCms_UHC_HW_H_1[]; -extern const FX_WORD g_FXCMAP_KSCms_UHC_HW_V_1[]; -extern const FX_WORD g_FXCMAP_KSCpc_EUC_H_0[]; -extern const FX_WORD g_FXCMAP_UniKS_UCS2_H_1[]; -extern const FX_WORD g_FXCMAP_UniKS_UCS2_V_1[]; -extern const FX_WORD g_FXCMAP_UniKS_UTF16_H_0[]; -extern const FX_WORD g_FXCMAP_Korea1CID2Unicode_2[]; +extern const uint16_t g_FXCMAP_KSC_EUC_H_0[]; +extern const uint16_t g_FXCMAP_KSC_EUC_V_0[]; +extern const uint16_t g_FXCMAP_KSCms_UHC_H_1[]; +extern const uint16_t g_FXCMAP_KSCms_UHC_V_1[]; +extern const uint16_t g_FXCMAP_KSCms_UHC_HW_H_1[]; +extern const uint16_t g_FXCMAP_KSCms_UHC_HW_V_1[]; +extern const uint16_t g_FXCMAP_KSCpc_EUC_H_0[]; +extern const uint16_t g_FXCMAP_UniKS_UCS2_H_1[]; +extern const uint16_t g_FXCMAP_UniKS_UCS2_V_1[]; +extern const uint16_t g_FXCMAP_UniKS_UTF16_H_0[]; +extern const uint16_t g_FXCMAP_Korea1CID2Unicode_2[]; #endif // CORE_FPDFAPI_FPDF_CMAPS_KOREA1_CMAPS_KOREA1_H_ diff --git a/core/fpdfapi/fpdf_cmaps/cmap_int.h b/core/fpdfapi/fpdf_cmaps/cmap_int.h index a812d84f33..8dea4b4759 100644 --- a/core/fpdfapi/fpdf_cmaps/cmap_int.h +++ b/core/fpdfapi/fpdf_cmaps/cmap_int.h @@ -7,17 +7,17 @@ #ifndef CORE_FPDFAPI_FPDF_CMAPS_CMAP_INT_H_ #define CORE_FPDFAPI_FPDF_CMAPS_CMAP_INT_H_ -#include "core/include/fxcrt/fx_system.h" // For FX_WORD. +#include "core/include/fxcrt/fx_system.h" struct FXCMAP_CMap { enum MapType { None, Single, Range, Reverse }; const char* m_Name; MapType m_WordMapType; - const FX_WORD* m_pWordMap; + const uint16_t* m_pWordMap; int m_WordCount; MapType m_DWordMapType; - const FX_WORD* m_pDWordMap; + const uint16_t* m_pDWordMap; int m_DWordCount; int m_UseOffset; }; @@ -26,7 +26,7 @@ void FPDFAPI_FindEmbeddedCMap(const char* name, int charset, int coding, const FXCMAP_CMap*& pMap); -FX_WORD FPDFAPI_CIDFromCharCode(const FXCMAP_CMap* pMap, FX_DWORD charcode); -FX_DWORD FPDFAPI_CharCodeFromCID(const FXCMAP_CMap* pMap, FX_WORD cid); +uint16_t FPDFAPI_CIDFromCharCode(const FXCMAP_CMap* pMap, FX_DWORD charcode); +FX_DWORD FPDFAPI_CharCodeFromCID(const FXCMAP_CMap* pMap, uint16_t cid); #endif // CORE_FPDFAPI_FPDF_CMAPS_CMAP_INT_H_ diff --git a/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp b/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp index d54620d701..73ac8e1f6a 100644 --- a/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp +++ b/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp @@ -30,15 +30,15 @@ void FPDFAPI_FindEmbeddedCMap(const char* name, } extern "C" { static int compareWord(const void* p1, const void* p2) { - return (*(FX_WORD*)p1) - (*(FX_WORD*)p2); + return (*(uint16_t*)p1) - (*(uint16_t*)p2); } }; extern "C" { static int compareWordRange(const void* key, const void* element) { - if (*(FX_WORD*)key < *(FX_WORD*)element) { + if (*(uint16_t*)key < *(uint16_t*)element) { return -1; } - if (*(FX_WORD*)key > ((FX_WORD*)element)[1]) { + if (*(uint16_t*)key > ((uint16_t*)element)[1]) { return 1; } return 0; @@ -47,15 +47,15 @@ static int compareWordRange(const void* key, const void* element) { extern "C" { static int compareDWordRange(const void* p1, const void* p2) { FX_DWORD key = *(FX_DWORD*)p1; - FX_WORD hiword = (FX_WORD)(key >> 16); - FX_WORD* element = (FX_WORD*)p2; + uint16_t hiword = (uint16_t)(key >> 16); + uint16_t* element = (uint16_t*)p2; if (hiword < element[0]) { return -1; } if (hiword > element[0]) { return 1; } - FX_WORD loword = (FX_WORD)key; + uint16_t loword = (uint16_t)key; if (loword < element[1]) { return -1; } @@ -68,7 +68,7 @@ static int compareDWordRange(const void* p1, const void* p2) { extern "C" { static int compareDWordSingle(const void* p1, const void* p2) { FX_DWORD key = *(FX_DWORD*)p1; - FX_DWORD value = ((*(FX_WORD*)p2) << 16) | ((FX_WORD*)p2)[1]; + FX_DWORD value = ((*(uint16_t*)p2) << 16) | ((uint16_t*)p2)[1]; if (key < value) { return -1; } @@ -78,20 +78,20 @@ static int compareDWordSingle(const void* p1, const void* p2) { return 0; } }; -FX_WORD FPDFAPI_CIDFromCharCode(const FXCMAP_CMap* pMap, FX_DWORD charcode) { +uint16_t FPDFAPI_CIDFromCharCode(const FXCMAP_CMap* pMap, FX_DWORD charcode) { if (charcode >> 16) { while (1) { if (pMap->m_DWordMapType == FXCMAP_CMap::Range) { - FX_WORD* found = - (FX_WORD*)FXSYS_bsearch(&charcode, pMap->m_pDWordMap, - pMap->m_DWordCount, 8, compareDWordRange); + uint16_t* found = + (uint16_t*)FXSYS_bsearch(&charcode, pMap->m_pDWordMap, + pMap->m_DWordCount, 8, compareDWordRange); if (found) { - return found[3] + (FX_WORD)charcode - found[1]; + return found[3] + (uint16_t)charcode - found[1]; } } else if (pMap->m_DWordMapType == FXCMAP_CMap::Single) { - FX_WORD* found = - (FX_WORD*)FXSYS_bsearch(&charcode, pMap->m_pDWordMap, - pMap->m_DWordCount, 6, compareDWordSingle); + uint16_t* found = + (uint16_t*)FXSYS_bsearch(&charcode, pMap->m_pDWordMap, + pMap->m_DWordCount, 6, compareDWordSingle); if (found) { return found[2]; } @@ -103,19 +103,19 @@ FX_WORD FPDFAPI_CIDFromCharCode(const FXCMAP_CMap* pMap, FX_DWORD charcode) { } return 0; } - FX_WORD code = (FX_WORD)charcode; + uint16_t code = (uint16_t)charcode; while (1) { if (!pMap->m_pWordMap) { return 0; } if (pMap->m_WordMapType == FXCMAP_CMap::Single) { - FX_WORD* found = (FX_WORD*)FXSYS_bsearch( + uint16_t* found = (uint16_t*)FXSYS_bsearch( &code, pMap->m_pWordMap, pMap->m_WordCount, 4, compareWord); if (found) { return found[1]; } } else if (pMap->m_WordMapType == FXCMAP_CMap::Range) { - FX_WORD* found = (FX_WORD*)FXSYS_bsearch( + uint16_t* found = (uint16_t*)FXSYS_bsearch( &code, pMap->m_pWordMap, pMap->m_WordCount, 6, compareWordRange); if (found) { return found[2] + code - found[0]; @@ -128,11 +128,11 @@ FX_WORD FPDFAPI_CIDFromCharCode(const FXCMAP_CMap* pMap, FX_DWORD charcode) { } return 0; } -FX_DWORD FPDFAPI_CharCodeFromCID(const FXCMAP_CMap* pMap, FX_WORD cid) { +FX_DWORD FPDFAPI_CharCodeFromCID(const FXCMAP_CMap* pMap, uint16_t cid) { while (1) { if (pMap->m_WordMapType == FXCMAP_CMap::Single) { - const FX_WORD* pCur = pMap->m_pWordMap; - const FX_WORD* pEnd = pMap->m_pWordMap + pMap->m_WordCount * 2; + const uint16_t* pCur = pMap->m_pWordMap; + const uint16_t* pEnd = pMap->m_pWordMap + pMap->m_WordCount * 2; while (pCur < pEnd) { if (pCur[1] == cid) { return pCur[0]; @@ -140,8 +140,8 @@ FX_DWORD FPDFAPI_CharCodeFromCID(const FXCMAP_CMap* pMap, FX_WORD cid) { pCur += 2; } } else if (pMap->m_WordMapType == FXCMAP_CMap::Range) { - const FX_WORD* pCur = pMap->m_pWordMap; - const FX_WORD* pEnd = pMap->m_pWordMap + pMap->m_WordCount * 3; + const uint16_t* pCur = pMap->m_pWordMap; + const uint16_t* pEnd = pMap->m_pWordMap + pMap->m_WordCount * 3; while (pCur < pEnd) { if (cid >= pCur[2] && cid <= pCur[2] + pCur[1] - pCur[0]) { return pCur[0] + cid - pCur[2]; @@ -156,8 +156,8 @@ FX_DWORD FPDFAPI_CharCodeFromCID(const FXCMAP_CMap* pMap, FX_WORD cid) { } while (1) { if (pMap->m_DWordMapType == FXCMAP_CMap::Range) { - const FX_WORD* pCur = pMap->m_pDWordMap; - const FX_WORD* pEnd = pMap->m_pDWordMap + pMap->m_DWordCount * 4; + const uint16_t* pCur = pMap->m_pDWordMap; + const uint16_t* pEnd = pMap->m_pDWordMap + pMap->m_DWordCount * 4; while (pCur < pEnd) { if (cid >= pCur[3] && cid <= pCur[3] + pCur[2] - pCur[1]) { return (((FX_DWORD)pCur[0] << 16) | pCur[1]) + cid - pCur[3]; @@ -165,8 +165,8 @@ FX_DWORD FPDFAPI_CharCodeFromCID(const FXCMAP_CMap* pMap, FX_WORD cid) { pCur += 4; } } else if (pMap->m_DWordMapType == FXCMAP_CMap::Single) { - const FX_WORD* pCur = pMap->m_pDWordMap; - const FX_WORD* pEnd = pMap->m_pDWordMap + pMap->m_DWordCount * 3; + const uint16_t* pCur = pMap->m_pDWordMap; + const uint16_t* pEnd = pMap->m_pDWordMap + pMap->m_DWordCount * 3; while (pCur < pEnd) { if (pCur[2] == cid) { return ((FX_DWORD)pCur[0] << 16) | pCur[1]; @@ -183,7 +183,7 @@ FX_DWORD FPDFAPI_CharCodeFromCID(const FXCMAP_CMap* pMap, FX_WORD cid) { } void FPDFAPI_LoadCID2UnicodeMap(CIDSet charset, - const FX_WORD*& pMap, + const uint16_t*& pMap, FX_DWORD& count) { CPDF_FontGlobals* pFontGlobals = CPDF_ModuleMgr::Get()->GetPageModule()->GetFontGlobals(); diff --git a/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp index 2fddf10a78..874b205c84 100644 --- a/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp +++ b/core/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp @@ -463,7 +463,7 @@ static const FX_LANG2CS gs_FXLang2CharsetTable[] = { {3763, 163}, {3886, 134}, {105943, 0}, {106375, 1}, {3923451837, 134}, {3923451838, 136}, }; -static FX_WORD FX_GetCsFromLangCode(uint32_t uCode) { +static uint16_t FX_GetCsFromLangCode(uint32_t uCode) { int32_t iStart = 0; int32_t iEnd = sizeof(gs_FXLang2CharsetTable) / sizeof(FX_LANG2CS) - 1; while (iStart <= iEnd) { @@ -480,7 +480,7 @@ static FX_WORD FX_GetCsFromLangCode(uint32_t uCode) { } return 0; } -static FX_WORD FX_GetCharsetFromLang(const FX_CHAR* pLang, int32_t iLength) { +static uint16_t FX_GetCharsetFromLang(const FX_CHAR* pLang, int32_t iLength) { FXSYS_assert(pLang); if (iLength < 0) { iLength = FXSYS_strlen(pLang); diff --git a/core/fpdfapi/fpdf_font/font_int.h b/core/fpdfapi/fpdf_font/font_int.h index 8ceefe353e..c9981387e6 100644 --- a/core/fpdfapi/fpdf_font/font_int.h +++ b/core/fpdfapi/fpdf_font/font_int.h @@ -71,7 +71,7 @@ class CPDF_FontGlobals { int m_Count; } m_EmbeddedCharsets[CIDSET_NUM_SETS]; struct { - const FX_WORD* m_pMap; + const uint16_t* m_pMap; int m_Count; } m_EmbeddedToUnicodes[CIDSET_NUM_SETS]; @@ -128,8 +128,8 @@ class CPDF_CMap { void Release(); FX_BOOL IsLoaded() const { return m_bLoaded; } FX_BOOL IsVertWriting() const { return m_bVertical; } - FX_WORD CIDFromCharCode(FX_DWORD charcode) const; - FX_DWORD CharCodeFromCID(FX_WORD CID) const; + uint16_t CIDFromCharCode(FX_DWORD charcode) const; + FX_DWORD CharCodeFromCID(uint16_t CID) const; int GetCharSize(FX_DWORD charcode) const; FX_DWORD GetNextChar(const FX_CHAR* pString, int nStrLen, int& offset) const; int CountChar(const FX_CHAR* pString, int size) const; @@ -155,7 +155,7 @@ class CPDF_CMap { CodingScheme m_CodingScheme; int m_nCodeRanges; uint8_t* m_pLeadingBytes; - FX_WORD* m_pMapping; + uint16_t* m_pMapping; uint8_t* m_pAddMapping; FX_BOOL m_bLoaded; const FXCMAP_CMap* m_pEmbedMap; @@ -169,11 +169,11 @@ class CPDF_CID2UnicodeMap { FX_BOOL Initialize(); FX_BOOL IsLoaded(); void Load(CPDF_CMapManager* pMgr, CIDSet charset, FX_BOOL bPromptCJK); - FX_WCHAR UnicodeFromCID(FX_WORD CID); + FX_WCHAR UnicodeFromCID(uint16_t CID); protected: CIDSet m_Charset; - const FX_WORD* m_pEmbeddedMap; + const uint16_t* m_pEmbeddedMap; FX_DWORD m_EmbeddedCount; }; @@ -197,7 +197,7 @@ class CPDF_ToUnicodeMap { }; void FPDFAPI_LoadCID2UnicodeMap(CIDSet charset, - const FX_WORD*& pMap, + const uint16_t*& pMap, FX_DWORD& count); #endif // CORE_FPDFAPI_FPDF_FONT_FONT_INT_H_ diff --git a/core/fpdfapi/fpdf_font/fpdf_font.cpp b/core/fpdfapi/fpdf_font/fpdf_font.cpp index 0f58bcba09..d079110679 100644 --- a/core/fpdfapi/fpdf_font/fpdf_font.cpp +++ b/core/fpdfapi/fpdf_font/fpdf_font.cpp @@ -531,7 +531,7 @@ CFX_WideString CPDF_ToUnicodeMap::Lookup(FX_DWORD charcode) { return CFX_WideString(buf + index + 1, len); } if (m_pBaseMap) { - return m_pBaseMap->UnicodeFromCID((FX_WORD)charcode); + return m_pBaseMap->UnicodeFromCID((uint16_t)charcode); } return CFX_WideString(); } @@ -1106,7 +1106,7 @@ void CPDF_Type1Font::LoadGlyphMap() { for (int charcode = 0; charcode < 256; charcode++) { const uint8_t prefix[4] = {0x00, 0xf0, 0xf1, 0xf2}; for (int j = 0; j < 4; j++) { - FX_WORD unicode = prefix[j] * 256 + charcode; + uint16_t unicode = prefix[j] * 256 + charcode; m_GlyphIndex[charcode] = FXFT_Get_Char_Index(m_Font.GetFace(), unicode); #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ @@ -1383,7 +1383,7 @@ int CPDF_FontEncoding::CharCodeFromUnicode(FX_WCHAR unicode) const { } CPDF_FontEncoding::CPDF_FontEncoding(int PredefinedEncoding) { - const FX_WORD* pSrc = PDF_UnicodesForPredefinedCharSet(PredefinedEncoding); + const uint16_t* pSrc = PDF_UnicodesForPredefinedCharSet(PredefinedEncoding); if (!pSrc) { FXSYS_memset(m_Unicodes, 0, sizeof(m_Unicodes)); } else { @@ -1401,7 +1401,7 @@ CPDF_Object* CPDF_FontEncoding::Realize() { int predefined = 0; for (int cs = PDFFONT_ENCODING_WINANSI; cs < PDFFONT_ENCODING_ZAPFDINGBATS; cs++) { - const FX_WORD* pSrc = PDF_UnicodesForPredefinedCharSet(cs); + const uint16_t* pSrc = PDF_UnicodesForPredefinedCharSet(cs); FX_BOOL match = TRUE; for (int i = 0; i < 256; ++i) { if (m_Unicodes[i] != pSrc[i]) { @@ -1426,7 +1426,7 @@ CPDF_Object* CPDF_FontEncoding::Realize() { } return NULL; } - const FX_WORD* pStandard = + const uint16_t* pStandard = PDF_UnicodesForPredefinedCharSet(PDFFONT_ENCODING_WINANSI); CPDF_Array* pDiff = new CPDF_Array; for (int i = 0; i < 256; i++) { @@ -1503,7 +1503,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap() { for (; charcode < nStartChar; charcode++) { m_GlyphIndex[charcode] = 0; } - FX_WORD nGlyph = charcode - nStartChar + 3; + uint16_t nGlyph = charcode - nStartChar + 3; for (; charcode < 256; charcode++, nGlyph++) { m_GlyphIndex[charcode] = nGlyph; } @@ -1533,7 +1533,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap() { if (bMSSymbol) { const uint8_t prefix[4] = {0x00, 0xf0, 0xf1, 0xf2}; for (int j = 0; j < 4; j++) { - FX_WORD unicode = prefix[j] * 256 + charcode; + uint16_t unicode = prefix[j] * 256 + charcode; m_GlyphIndex[charcode] = FXFT_Get_Char_Index(m_Font.GetFace(), unicode); if (m_GlyphIndex[charcode]) { @@ -1587,7 +1587,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap() { FX_BOOL bGotOne = FALSE; for (int charcode = 0; charcode < 256; charcode++) { for (int j = 0; j < 4; j++) { - FX_WORD unicode = prefix[j] * 256 + charcode; + uint16_t unicode = prefix[j] * 256 + charcode; m_GlyphIndex[charcode] = FXFT_Get_Char_Index(m_Font.GetFace(), unicode); if (m_GlyphIndex[charcode]) { bGotOne = TRUE; @@ -1630,7 +1630,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap() { } if (FXFT_Select_Charmap(m_Font.GetFace(), FXFT_ENCODING_UNICODE) == 0) { FX_BOOL bGotOne = FALSE; - const FX_WORD* pUnicodes = PDF_UnicodesForPredefinedCharSet(baseEncoding); + const uint16_t* pUnicodes = PDF_UnicodesForPredefinedCharSet(baseEncoding); for (int charcode = 0; charcode < 256; charcode++) { if (m_pFontFile) { m_Encoding.m_Unicodes[charcode] = charcode; diff --git a/core/fpdfapi/fpdf_font/fpdf_font_charset.cpp b/core/fpdfapi/fpdf_font/fpdf_font_charset.cpp index 642efd62ca..1b503c69a6 100644 --- a/core/fpdfapi/fpdf_font/fpdf_font_charset.cpp +++ b/core/fpdfapi/fpdf_font/fpdf_font_charset.cpp @@ -9,7 +9,7 @@ #include "core/include/fxge/fx_freetype.h" static const struct _UnicodeAlt { - FX_WORD m_Unicode; + uint16_t m_Unicode; const FX_CHAR* m_Alter; } UnicodeAlts[] = { {0x00a0, " "}, {0x00a1, "!"}, {0x00a2, "c"}, {0x00a3, "P"}, @@ -60,7 +60,7 @@ const FX_CHAR* FCS_GetAltStr(FX_WCHAR unicode) { int end = sizeof UnicodeAlts / sizeof(struct _UnicodeAlt) - 1; while (begin <= end) { int middle = (begin + end) / 2; - FX_WORD middlecode = UnicodeAlts[middle].m_Unicode; + uint16_t middlecode = UnicodeAlts[middle].m_Unicode; if (middlecode > unicode) { end = middle - 1; } else if (middlecode < unicode) { @@ -71,7 +71,7 @@ const FX_CHAR* FCS_GetAltStr(FX_WCHAR unicode) { } return NULL; } -static const FX_WORD StandardEncoding[256] = { +static const uint16_t StandardEncoding[256] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -101,7 +101,7 @@ static const FX_WORD StandardEncoding[256] = { 0x0152, 0x00ba, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00e6, 0x0000, 0x0000, 0x0000, 0x0131, 0x0000, 0x0000, 0x0142, 0x00f8, 0x0153, 0x00df, 0x0000, 0x0000, 0x0000, 0x0000}; -static const FX_WORD MacRomanEncoding[256] = { +static const uint16_t MacRomanEncoding[256] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -131,7 +131,7 @@ static const FX_WORD MacRomanEncoding[256] = { 0x00cd, 0x00ce, 0x00cf, 0x00cc, 0x00d3, 0x00d4, 0x0000, 0x00d2, 0x00da, 0x00db, 0x00d9, 0x0131, 0x02c6, 0x02dc, 0x00af, 0x02d8, 0x02d9, 0x02da, 0x00b8, 0x02dd, 0x02db, 0x02c7}; -static const FX_WORD AdobeWinAnsiEncoding[256] = { +static const uint16_t AdobeWinAnsiEncoding[256] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -161,7 +161,7 @@ static const FX_WORD AdobeWinAnsiEncoding[256] = { 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, 0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff}; -static const FX_WORD MacExpertEncoding[256] = { +static const uint16_t MacExpertEncoding[256] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -191,7 +191,7 @@ static const FX_WORD MacExpertEncoding[256] = { 0xf6f2, 0xf6eb, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xf6ee, 0xf6fb, 0xf6f4, 0xf7af, 0xf6ea, 0x207f, 0xf6ef, 0xf6e2, 0xf6e8, 0xf6f7, 0xf6fc, 0x0000, 0x0000, 0x0000, 0x0000}; -static const FX_WORD AdobeSymbolEncoding[256] = { +static const uint16_t AdobeSymbolEncoding[256] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -222,7 +222,7 @@ static const FX_WORD AdobeSymbolEncoding[256] = { 0x2320, 0xF8F5, 0x2321, 0xF8F6, 0xF8F7, 0xF8F8, 0xF8F9, 0xF8FA, 0xF8FB, 0xF8FC, 0xF8FD, 0xF8FE, 0x0000, }; -static const FX_WORD ZapfEncoding[256] = { +static const uint16_t ZapfEncoding[256] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -1677,7 +1677,7 @@ const FX_CHAR* PDF_CharNameFromPredefinedCharSet(int encoding, FX_WCHAR FT_UnicodeFromCharCode(int encoding, FX_DWORD charcode) { switch (encoding) { case FXFT_ENCODING_UNICODE: - return (FX_WORD)charcode; + return (uint16_t)charcode; case FXFT_ENCODING_ADOBE_STANDARD: return StandardEncoding[(uint8_t)charcode]; case FXFT_ENCODING_ADOBE_EXPERT: @@ -1691,14 +1691,14 @@ FX_WCHAR FT_UnicodeFromCharCode(int encoding, FX_DWORD charcode) { } return 0; } -static FX_DWORD PDF_FindCode(const FX_WORD* pCodes, FX_WORD unicode) { +static FX_DWORD PDF_FindCode(const uint16_t* pCodes, uint16_t unicode) { for (FX_DWORD i = 0; i < 256; i++) if (pCodes[i] == unicode) { return i; } return 0; } -static const FX_WORD MSSymbolEncoding[256] = { +static const uint16_t MSSymbolEncoding[256] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -1747,7 +1747,7 @@ FX_DWORD FT_CharCodeFromUnicode(int encoding, FX_WCHAR unicode) { } return 0; } -const FX_WORD* PDF_UnicodesForPredefinedCharSet(int encoding) { +const uint16_t* PDF_UnicodesForPredefinedCharSet(int encoding) { switch (encoding) { case PDFFONT_ENCODING_WINANSI: return AdobeWinAnsiEncoding; diff --git a/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp b/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp index f370b86049..60fa40103b 100644 --- a/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp +++ b/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp @@ -306,7 +306,7 @@ FX_DWORD EmbeddedCharcodeFromUnicode(const FXCMAP_CMap* pEmbedMap, CPDF_FontGlobals* pFontGlobals = CPDF_ModuleMgr::Get()->GetPageModule()->GetFontGlobals(); - const FX_WORD* pCodes = pFontGlobals->m_EmbeddedToUnicodes[charset].m_pMap; + const uint16_t* pCodes = pFontGlobals->m_EmbeddedToUnicodes[charset].m_pMap; if (!pCodes) return 0; @@ -329,13 +329,13 @@ FX_WCHAR EmbeddedUnicodeFromCharcode(const FXCMAP_CMap* pEmbedMap, if (!IsValidEmbeddedCharcodeFromUnicodeCharset(charset)) return 0; - FX_WORD cid = FPDFAPI_CIDFromCharCode(pEmbedMap, charcode); + uint16_t cid = FPDFAPI_CIDFromCharCode(pEmbedMap, charcode); if (cid == 0) return 0; CPDF_FontGlobals* pFontGlobals = CPDF_ModuleMgr::Get()->GetPageModule()->GetFontGlobals(); - const FX_WORD* pCodes = pFontGlobals->m_EmbeddedToUnicodes[charset].m_pMap; + const uint16_t* pCodes = pFontGlobals->m_EmbeddedToUnicodes[charset].m_pMap; if (!pCodes) return 0; @@ -372,7 +372,7 @@ void FT_UseCIDCharmap(FXFT_Face face, int coding) { } const struct CIDTransform { - FX_WORD CID; + uint16_t CID; uint8_t a, b, c, d, e, f; } g_Japan1_VertCIDs[] = { {97, 129, 0, 0, 127, 55, 0}, {7887, 127, 0, 0, 127, 76, 89}, @@ -455,7 +455,7 @@ const struct CIDTransform { }; int CompareCIDTransform(const void* key, const void* element) { - FX_WORD CID = *static_cast<const FX_WORD*>(key); + uint16_t CID = *static_cast<const uint16_t*>(key); return CID - static_cast<const struct CIDTransform*>(element)->CID; } @@ -565,24 +565,24 @@ void CPDF_CMapParser::ParseWord(const CFX_ByteStringC& word) { m_CodePoints[m_CodeSeq] = CMap_GetCode(word); m_CodeSeq++; FX_DWORD StartCode, EndCode; - FX_WORD StartCID; + uint16_t StartCID; if (m_Status == 1) { if (m_CodeSeq < 2) { return; } EndCode = StartCode = m_CodePoints[0]; - StartCID = (FX_WORD)m_CodePoints[1]; + StartCID = (uint16_t)m_CodePoints[1]; } else { if (m_CodeSeq < 3) { return; } StartCode = m_CodePoints[0]; EndCode = m_CodePoints[1]; - StartCID = (FX_WORD)m_CodePoints[2]; + StartCID = (uint16_t)m_CodePoints[2]; } if (EndCode < 0x10000) { for (FX_DWORD code = StartCode; code <= EndCode; code++) { - m_pCMap->m_pMapping[code] = (FX_WORD)(StartCID + code - StartCode); + m_pCMap->m_pMapping[code] = (uint16_t)(StartCID + code - StartCode); } } else { FX_DWORD buf[2]; @@ -755,7 +755,7 @@ FX_BOOL CPDF_CMap::LoadPredefined(CPDF_CMapManager* pMgr, return FALSE; } FX_BOOL CPDF_CMap::LoadEmbedded(const uint8_t* pData, FX_DWORD size) { - m_pMapping = FX_Alloc(FX_WORD, 65536); + m_pMapping = FX_Alloc(uint16_t, 65536); CPDF_CMapParser parser; parser.Initialize(this); CPDF_SimpleParser syntax(pData, size); @@ -777,15 +777,15 @@ FX_BOOL CPDF_CMap::LoadEmbedded(const uint8_t* pData, FX_DWORD size) { return TRUE; } -FX_WORD CPDF_CMap::CIDFromCharCode(FX_DWORD charcode) const { +uint16_t CPDF_CMap::CIDFromCharCode(FX_DWORD charcode) const { if (m_Coding == CIDCODING_CID) { - return (FX_WORD)charcode; + return (uint16_t)charcode; } if (m_pEmbedMap) { return FPDFAPI_CIDFromCharCode(m_pEmbedMap, charcode); } if (!m_pMapping) { - return (FX_WORD)charcode; + return (uint16_t)charcode; } if (charcode >> 16) { if (m_pAddMapping) { @@ -797,8 +797,8 @@ FX_WORD CPDF_CMap::CIDFromCharCode(FX_DWORD charcode) const { } return 0; } - return (FX_WORD)(((FX_DWORD*)found)[1] % 65536 + charcode - - *(FX_DWORD*)found); + return (uint16_t)(((FX_DWORD*)found)[1] % 65536 + charcode - + *(FX_DWORD*)found); } if (m_pUseMap) return m_pUseMap->CIDFromCharCode(charcode); @@ -807,7 +807,7 @@ FX_WORD CPDF_CMap::CIDFromCharCode(FX_DWORD charcode) const { FX_DWORD CID = m_pMapping[charcode]; if (!CID && m_pUseMap) return m_pUseMap->CIDFromCharCode(charcode); - return (FX_WORD)CID; + return (uint16_t)CID; } FX_DWORD CPDF_CMap::GetNextChar(const FX_CHAR* pString, @@ -956,7 +956,7 @@ FX_BOOL CPDF_CID2UnicodeMap::Initialize() { FX_BOOL CPDF_CID2UnicodeMap::IsLoaded() { return m_EmbeddedCount != 0; } -FX_WCHAR CPDF_CID2UnicodeMap::UnicodeFromCID(FX_WORD CID) { +FX_WCHAR CPDF_CID2UnicodeMap::UnicodeFromCID(uint16_t CID) { if (m_Charset == CIDSET_UNICODE) { return CID; } @@ -1004,9 +1004,9 @@ CPDF_CIDFont* CPDF_CIDFont::AsCIDFont() { return this; } -FX_WORD CPDF_CIDFont::CIDFromCharCode(FX_DWORD charcode) const { +uint16_t CPDF_CIDFont::CIDFromCharCode(FX_DWORD charcode) const { if (!m_pCMap) { - return (FX_WORD)charcode; + return (uint16_t)charcode; } return m_pCMap->CIDFromCharCode(charcode); } @@ -1034,7 +1034,7 @@ FX_WCHAR CPDF_CIDFont::GetUnicodeFromCharCode(FX_DWORD charcode) const { if (!m_pCID2UnicodeMap || !m_pCID2UnicodeMap->IsLoaded()) { return 0; } - return m_pCID2UnicodeMap->UnicodeFromCID((FX_WORD)charcode); + return m_pCID2UnicodeMap->UnicodeFromCID((uint16_t)charcode); } if (!m_pCMap->IsLoaded() || !m_pCID2UnicodeMap || !m_pCID2UnicodeMap->IsLoaded()) { @@ -1078,7 +1078,8 @@ FX_DWORD CPDF_CIDFont::CharCodeFromUnicode(FX_WCHAR unicode) const { } FX_DWORD CID = 0; while (CID < 65536) { - FX_WCHAR this_unicode = m_pCID2UnicodeMap->UnicodeFromCID((FX_WORD)CID); + FX_WCHAR this_unicode = + m_pCID2UnicodeMap->UnicodeFromCID((uint16_t)CID); if (this_unicode == unicode) { return CID; } @@ -1287,7 +1288,7 @@ FX_RECT CPDF_CIDFont::GetCharBBox(FX_DWORD charcode, int level) { } } if (!m_pFontFile && m_Charset == CIDSET_JAPAN1) { - FX_WORD CID = CIDFromCharCode(charcode); + uint16_t CID = CIDFromCharCode(charcode); const uint8_t* pTransform = GetCIDTransform(CID); if (pTransform && !bVert) { CFX_Matrix matrix(CIDTransformToFloat(pTransform[0]), @@ -1310,7 +1311,7 @@ int CPDF_CIDFont::GetCharWidthF(FX_DWORD charcode, int level) { if (m_pAnsiWidths && charcode < 0x80) { return m_pAnsiWidths[charcode]; } - FX_WORD cid = CIDFromCharCode(charcode); + uint16_t cid = CIDFromCharCode(charcode); int size = m_WidthList.GetSize(); FX_DWORD* list = m_WidthList.GetData(); for (int i = 0; i < size; i += 3) { @@ -1320,7 +1321,7 @@ int CPDF_CIDFont::GetCharWidthF(FX_DWORD charcode, int level) { } return m_DefaultWidth; } -short CPDF_CIDFont::GetVertWidth(FX_WORD CID) const { +short CPDF_CIDFont::GetVertWidth(uint16_t CID) const { FX_DWORD vertsize = m_VertMetrics.GetSize() / 5; if (vertsize == 0) { return m_DefaultW1; @@ -1332,7 +1333,7 @@ short CPDF_CIDFont::GetVertWidth(FX_WORD CID) const { } return m_DefaultW1; } -void CPDF_CIDFont::GetVertOrigin(FX_WORD CID, short& vx, short& vy) const { +void CPDF_CIDFont::GetVertOrigin(uint16_t CID, short& vx, short& vy) const { FX_DWORD vertsize = m_VertMetrics.GetSize() / 5; if (vertsize) { const FX_DWORD* pTable = m_VertMetrics.GetData(); @@ -1348,7 +1349,7 @@ void CPDF_CIDFont::GetVertOrigin(FX_WORD CID, short& vx, short& vy) const { const FX_DWORD* list = m_WidthList.GetData(); for (int i = 0; i < size; i += 3) { if (CID >= list[i] && CID <= list[i + 1]) { - dwWidth = (FX_WORD)list[i + 2]; + dwWidth = (uint16_t)list[i + 2]; break; } } @@ -1410,7 +1411,7 @@ int CPDF_CIDFont::GlyphFromCharCode(FX_DWORD charcode, FX_BOOL* pVertGlyph) { *pVertGlyph = FALSE; } if (!m_pFontFile && !m_pCIDToGIDMap) { - FX_WORD cid = CIDFromCharCode(charcode); + uint16_t cid = CIDFromCharCode(charcode); FX_WCHAR unicode = 0; if (m_bCIDIsGID) { #if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_ @@ -1458,7 +1459,7 @@ int CPDF_CIDFont::GlyphFromCharCode(FX_DWORD charcode, FX_BOOL* pVertGlyph) { if (!name) { return charcode == 0 ? -1 : (int)charcode; } - FX_WORD unicode = PDF_UnicodeFromAdobeName(name); + uint16_t unicode = PDF_UnicodeFromAdobeName(name); if (unicode) { if (bMSUnicode) { index = FXFT_Get_Char_Index(face, unicode); @@ -1520,7 +1521,7 @@ int CPDF_CIDFont::GlyphFromCharCode(FX_DWORD charcode, FX_BOOL* pVertGlyph) { if (!m_Font.GetFace()) return -1; - FX_WORD cid = CIDFromCharCode(charcode); + uint16_t cid = CIDFromCharCode(charcode); if (m_bType1) { if (!m_pCIDToGIDMap) { return cid; @@ -1658,14 +1659,14 @@ FX_BOOL CPDF_CIDFont::LoadGB2312() { } CheckFontMetrics(); m_DefaultWidth = 1000; - m_pAnsiWidths = FX_Alloc(FX_WORD, 128); + m_pAnsiWidths = FX_Alloc(uint16_t, 128); for (int i = 32; i < 127; i++) { m_pAnsiWidths[i] = 500; } return TRUE; } -const uint8_t* CPDF_CIDFont::GetCIDTransform(FX_WORD CID) const { +const uint8_t* CPDF_CIDFont::GetCIDTransform(uint16_t CID) const { if (m_Charset != CIDSET_JAPAN1 || m_pFontFile) return nullptr; diff --git a/core/fpdfapi/fpdf_page/cpdf_textobject.cpp b/core/fpdfapi/fpdf_page/cpdf_textobject.cpp index b4161f320e..ef37b30631 100644 --- a/core/fpdfapi/fpdf_page/cpdf_textobject.cpp +++ b/core/fpdfapi/fpdf_page/cpdf_textobject.cpp @@ -35,7 +35,7 @@ void CPDF_TextObject::GetItemInfo(int index, CPDF_TextObjectItem* pInfo) const { if (!pFont->AsCIDFont()->IsVertWriting()) { return; } - FX_WORD CID = pFont->AsCIDFont()->CIDFromCharCode(pInfo->m_CharCode); + uint16_t CID = pFont->AsCIDFont()->CIDFromCharCode(pInfo->m_CharCode); pInfo->m_OriginY = pInfo->m_OriginX; pInfo->m_OriginX = 0; short vx, vy; @@ -179,7 +179,7 @@ FX_FLOAT CPDF_TextObject::GetCharWidth(FX_DWORD charcode) const { if (!bVertWriting) return pFont->GetCharWidthF(charcode, 0) * fontsize; - FX_WORD CID = pCIDFont->CIDFromCharCode(charcode); + uint16_t CID = pCIDFont->CIDFromCharCode(charcode); return pCIDFont->GetVertWidth(CID) * fontsize; } @@ -240,7 +240,7 @@ void CPDF_TextObject::CalcPositionData(FX_FLOAT* pTextAdvanceX, } charwidth = pFont->GetCharWidthF(charcode, level) * fontsize / 1000; } else { - FX_WORD CID = pCIDFont->CIDFromCharCode(charcode); + uint16_t CID = pCIDFont->CIDFromCharCode(charcode); short vx; short vy; pCIDFont->GetVertOrigin(CID, vx, vy); diff --git a/core/fpdfapi/fpdf_parser/cpdf_parser_unittest.cpp b/core/fpdfapi/fpdf_parser/cpdf_parser_unittest.cpp index b343618f28..dc4d757120 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_parser_unittest.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_parser_unittest.cpp @@ -82,7 +82,7 @@ TEST(cpdf_parser, RebuildCrossRefCorrectly) { ASSERT_TRUE(parser.RebuildCrossRef()); const FX_FILESIZE offsets[] = {0, 15, 61, 154, 296, 374, 450}; - const FX_WORD versions[] = {0, 0, 2, 4, 6, 8, 0}; + const uint16_t versions[] = {0, 0, 2, 4, 6, 8, 0}; for (size_t i = 0; i < FX_ArraySize(offsets); ++i) EXPECT_EQ(offsets[i], parser.m_ObjectInfo[i].pos); for (size_t i = 0; i < FX_ArraySize(versions); ++i) diff --git a/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp b/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp index c91e99b9cb..75ff11c60c 100644 --- a/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp +++ b/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp @@ -19,7 +19,7 @@ #define _STREAM_MAX_SIZE_ 20 * 1024 * 1024 -const FX_WORD PDFDocEncoding[256] = { +const uint16_t PDFDocEncoding[256] = { 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x02d8, 0x02c7, 0x02c6, @@ -447,13 +447,13 @@ CFX_WideString PDF_DecodeText(const uint8_t* src_data, FX_DWORD src_len) { const uint8_t* uni_str = src_data + 2; int dest_pos = 0; for (FX_DWORD i = 0; i < max_chars * 2; i += 2) { - FX_WORD unicode = bBE ? (uni_str[i] << 8 | uni_str[i + 1]) - : (uni_str[i + 1] << 8 | uni_str[i]); + uint16_t unicode = bBE ? (uni_str[i] << 8 | uni_str[i + 1]) + : (uni_str[i + 1] << 8 | uni_str[i]); if (unicode == 0x1b) { i += 2; while (i < max_chars * 2) { - FX_WORD unicode = bBE ? (uni_str[i] << 8 | uni_str[i + 1]) - : (uni_str[i + 1] << 8 | uni_str[i]); + uint16_t unicode = bBE ? (uni_str[i] << 8 | uni_str[i + 1]) + : (uni_str[i + 1] << 8 | uni_str[i]); i += 2; if (unicode == 0x1b) { break; diff --git a/core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h b/core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h index 6a17ac5332..6904099b52 100644 --- a/core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h +++ b/core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h @@ -12,7 +12,7 @@ class CPDF_Dictionary; // Indexed by 8-bit char code, contains unicode code points. -extern const FX_WORD PDFDocEncoding[256]; +extern const uint16_t PDFDocEncoding[256]; CFX_ByteString PDF_NameDecode(const CFX_ByteStringC& orig); CFX_ByteString PDF_NameDecode(const CFX_ByteString& orig); diff --git a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp index 6741d1a70b..44e57e49ea 100644 --- a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp +++ b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp @@ -566,7 +566,7 @@ void CPDF_CharPosList::Load(int nChars, if (!pCIDFont) { continue; } - FX_WORD CID = pCIDFont->CIDFromCharCode(CharCode); + uint16_t CID = pCIDFont->CIDFromCharCode(CharCode); if (bVertWriting) { charpos.m_OriginY = charpos.m_OriginX; charpos.m_OriginX = 0; |