summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_cmaps/GB1
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-14 17:06:23 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-14 17:06:23 -0700
commit759247991b5f1df71335294e6bfe3e3fe7aec7b4 (patch)
tree3de1b72b34c3eae83f4b9fa58e978a643ff0bf6a /core/src/fpdfapi/fpdf_cmaps/GB1
parentdacc22cdfea727a04bce086d9bfec9a4d1a29bd4 (diff)
downloadpdfium-759247991b5f1df71335294e6bfe3e3fe7aec7b4.tar.xz
Move extern cmap declarations from .cpp files into new .h files.
That way, the compiler can check them against the definitions rather than just relying on the linker to line things up. Make the types of the declarations and definitions match exactly, instead of being synonym typedefs of each other. Fix some IWYU and use FX_ArraySize where possible. BUG=https://code.google.com/p/pdfium/issues/detail?id=178 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1221503005 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_cmaps/GB1')
-rw-r--r--core/src/fpdfapi/fpdf_cmaps/GB1/Adobe-GB1-UCS2_5.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_cmaps/GB1/GB-EUC-H_0.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_cmaps/GB1/GB-EUC-V_0.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-H_2.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-V_2.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_cmaps/GB1/GBK2K-H_5.cpp7
-rw-r--r--core/src/fpdfapi/fpdf_cmaps/GB1/GBK2K-V_5.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-H_2.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-V_2.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-H_0.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-V_0.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-H_4.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-V_4.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp20
-rw-r--r--core/src/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h27
15 files changed, 73 insertions, 29 deletions
diff --git a/core/src/fpdfapi/fpdf_cmaps/GB1/Adobe-GB1-UCS2_5.cpp b/core/src/fpdfapi/fpdf_cmaps/GB1/Adobe-GB1-UCS2_5.cpp
index 490806aafd..92cec8f382 100644
--- a/core/src/fpdfapi/fpdf_cmaps/GB1/Adobe-GB1-UCS2_5.cpp
+++ b/core/src/fpdfapi/fpdf_cmaps/GB1/Adobe-GB1-UCS2_5.cpp
@@ -4,7 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-extern const unsigned short g_FXCMAP_GB1CID2Unicode_5[30284] = {
+#include "cmaps_gb1.h"
+
+const FX_WORD 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,
diff --git a/core/src/fpdfapi/fpdf_cmaps/GB1/GB-EUC-H_0.cpp b/core/src/fpdfapi/fpdf_cmaps/GB1/GB-EUC-H_0.cpp
index 3e3c7288a9..8e9061168c 100644
--- a/core/src/fpdfapi/fpdf_cmaps/GB1/GB-EUC-H_0.cpp
+++ b/core/src/fpdfapi/fpdf_cmaps/GB1/GB-EUC-H_0.cpp
@@ -4,7 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-extern const unsigned short g_FXCMAP_GB_EUC_H_0[90 * 3] = {
+#include "cmaps_gb1.h"
+
+const FX_WORD 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/src/fpdfapi/fpdf_cmaps/GB1/GB-EUC-V_0.cpp b/core/src/fpdfapi/fpdf_cmaps/GB1/GB-EUC-V_0.cpp
index 316b7f2dfc..d020dc8b52 100644
--- a/core/src/fpdfapi/fpdf_cmaps/GB1/GB-EUC-V_0.cpp
+++ b/core/src/fpdfapi/fpdf_cmaps/GB1/GB-EUC-V_0.cpp
@@ -4,7 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-extern const unsigned short g_FXCMAP_GB_EUC_V_0[20 * 3] = {
+#include "cmaps_gb1.h"
+
+const FX_WORD 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/src/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-H_2.cpp b/core/src/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-H_2.cpp
index 12fb1d7fa8..0e26a8fdd8 100644
--- a/core/src/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-H_2.cpp
+++ b/core/src/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-H_2.cpp
@@ -4,7 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-extern const unsigned short g_FXCMAP_GBK_EUC_H_2[4071 * 3] = {
+#include "cmaps_gb1.h"
+
+const FX_WORD 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/src/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-V_2.cpp b/core/src/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-V_2.cpp
index 2ab2f6826a..336ab39fe4 100644
--- a/core/src/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-V_2.cpp
+++ b/core/src/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-V_2.cpp
@@ -4,7 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-extern const unsigned short g_FXCMAP_GBK_EUC_V_2[20 * 3] = {
+#include "cmaps_gb1.h"
+
+const FX_WORD 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/src/fpdfapi/fpdf_cmaps/GB1/GBK2K-H_5.cpp b/core/src/fpdfapi/fpdf_cmaps/GB1/GBK2K-H_5.cpp
index 0e16d54677..01555a64da 100644
--- a/core/src/fpdfapi/fpdf_cmaps/GB1/GBK2K-H_5.cpp
+++ b/core/src/fpdfapi/fpdf_cmaps/GB1/GBK2K-H_5.cpp
@@ -4,7 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-extern const unsigned short g_FXCMAP_GBK2K_H_5[4071 * 3] = {
+#include "cmaps_gb1.h"
+
+const FX_WORD 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,
@@ -1363,7 +1365,8 @@ extern const unsigned short g_FXCMAP_GBK2K_H_5[4071 * 3] = {
0xFD9E, 0xFD9E, 0x40D3, 0xFD9F, 0xFD9F, 0x200C, 0xFDA0, 0xFDA0, 0x5083,
0xFE40, 0xFE40, 0x1259, 0xFE41, 0xFE7E, 0x5610, 0xFE80, 0xFEA0, 0x564E,
};
-extern const unsigned short g_FXCMAP_GBK2K_H_5_DWord[1017 * 4] = {
+
+const FX_WORD 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, 0x57BB, 0x8139, 0x8430, 0x8439, 0x57C5, 0x8139, 0x8530, 0x8539, 0x57CF,
diff --git a/core/src/fpdfapi/fpdf_cmaps/GB1/GBK2K-V_5.cpp b/core/src/fpdfapi/fpdf_cmaps/GB1/GBK2K-V_5.cpp
index 1124bcfb9e..833cf2f77e 100644
--- a/core/src/fpdfapi/fpdf_cmaps/GB1/GBK2K-V_5.cpp
+++ b/core/src/fpdfapi/fpdf_cmaps/GB1/GBK2K-V_5.cpp
@@ -4,7 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-extern const unsigned short g_FXCMAP_GBK2K_V_5[41 * 3] = {
+#include "cmaps_gb1.h"
+
+const FX_WORD 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/src/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-H_2.cpp b/core/src/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-H_2.cpp
index 46ea87300d..b905785a92 100644
--- a/core/src/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-H_2.cpp
+++ b/core/src/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-H_2.cpp
@@ -4,7 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-extern const unsigned short g_FXCMAP_GBKp_EUC_H_2[4070 * 3] = {
+#include "cmaps_gb1.h"
+
+const FX_WORD 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/src/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-V_2.cpp b/core/src/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-V_2.cpp
index 4564fecb9f..53772dc037 100644
--- a/core/src/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-V_2.cpp
+++ b/core/src/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-V_2.cpp
@@ -4,7 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-extern const unsigned short g_FXCMAP_GBKp_EUC_V_2[20 * 3] = {
+#include "cmaps_gb1.h"
+
+const FX_WORD 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/src/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-H_0.cpp b/core/src/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-H_0.cpp
index 58f6d24475..2f4f15ab68 100644
--- a/core/src/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-H_0.cpp
+++ b/core/src/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-H_0.cpp
@@ -4,7 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-extern const unsigned short g_FXCMAP_GBpc_EUC_H_0[91 * 3] = {
+#include "cmaps_gb1.h"
+
+const FX_WORD 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/src/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-V_0.cpp b/core/src/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-V_0.cpp
index f95ef62ad9..fe44bf2ffe 100644
--- a/core/src/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-V_0.cpp
+++ b/core/src/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-V_0.cpp
@@ -4,7 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-extern const unsigned short g_FXCMAP_GBpc_EUC_V_0[20 * 3] = {
+#include "cmaps_gb1.h"
+
+const FX_WORD 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/src/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-H_4.cpp b/core/src/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-H_4.cpp
index b216d889e4..c57e346dd7 100644
--- a/core/src/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-H_4.cpp
+++ b/core/src/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-H_4.cpp
@@ -4,7 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-extern const unsigned short g_FXCMAP_UniGB_UCS2_H_4[13825 * 3] = {
+#include "cmaps_gb1.h"
+
+const FX_WORD 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/src/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-V_4.cpp b/core/src/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-V_4.cpp
index 6737a89219..80fdc9ec44 100644
--- a/core/src/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-V_4.cpp
+++ b/core/src/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-V_4.cpp
@@ -4,7 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-extern const unsigned short g_FXCMAP_UniGB_UCS2_V_4[24 * 3] = {
+#include "cmaps_gb1.h"
+
+const FX_WORD 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/src/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp b/core/src/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp
index e4f296135a..26d4cd6358 100644
--- a/core/src/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp
+++ b/core/src/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp
@@ -6,22 +6,11 @@
#include "../../../../include/fpdfapi/fpdf_resource.h"
#include "../../../../include/fpdfapi/fpdf_module.h"
+#include "../../../../include/fxcrt/fx_basic.h" // For FX_ArraySize().
#include "../../fpdf_font/font_int.h"
#include "../cmap_int.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[];
+#include "cmaps_gb1.h"
+
static const FXCMAP_CMap g_FXCMAP_GB1_cmaps[] = {
{ "GB-EUC-H", FXCMAP_CMap::Range, g_FXCMAP_GB_EUC_H_0, 90, FXCMAP_CMap::None, NULL, 0, 0 },
{ "GB-EUC-V", FXCMAP_CMap::Range, g_FXCMAP_GB_EUC_V_0, 20, FXCMAP_CMap::None, NULL, 0, -1 },
@@ -38,11 +27,12 @@ static const FXCMAP_CMap g_FXCMAP_GB1_cmaps[] = {
{ "UniGB-UTF16-H", FXCMAP_CMap::Range, g_FXCMAP_UniGB_UCS2_H_4, 13825, FXCMAP_CMap::None, NULL, 0, 0 },
{ "UniGB-UTF16-V", FXCMAP_CMap::Range, g_FXCMAP_UniGB_UCS2_V_4, 24, FXCMAP_CMap::None, NULL, 0, -1 },
};
+
void CPDF_ModuleMgr::LoadEmbeddedGB1CMaps()
{
CPDF_FontGlobals* pFontGlobals = CPDF_ModuleMgr::Get()->GetPageModule()->GetFontGlobals();
pFontGlobals->m_EmbeddedCharsets[CIDSET_GB1].m_pMapList = g_FXCMAP_GB1_cmaps;
- pFontGlobals->m_EmbeddedCharsets[CIDSET_GB1].m_Count = sizeof g_FXCMAP_GB1_cmaps / sizeof (FXCMAP_CMap);
+ pFontGlobals->m_EmbeddedCharsets[CIDSET_GB1].m_Count = FX_ArraySize(g_FXCMAP_GB1_cmaps);
pFontGlobals->m_EmbeddedToUnicodes[CIDSET_GB1].m_pMap = g_FXCMAP_GB1CID2Unicode_5;
pFontGlobals->m_EmbeddedToUnicodes[CIDSET_GB1].m_Count = 30284;
}
diff --git a/core/src/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h b/core/src/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h
new file mode 100644
index 0000000000..c74ed71b06
--- /dev/null
+++ b/core/src/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h
@@ -0,0 +1,27 @@
+// Copyright 2015 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef CORE_SRC_FPDFAPI_FPDF_CMAPS_GB1_CMAPS_GB1_H_
+#define CORE_SRC_FPDFAPI_FPDF_CMAPS_GB1_CMAPS_GB1_H_
+
+#include "../../../../include/fxcrt/fx_system.h" // For FX_WORD.
+
+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[];
+
+#endif // CORE_SRC_FPDFAPI_FPDF_CMAPS_GB1_CMAPS_GB1_H_