summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/include/fpdfapi/fpdf_parser.h10
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp15
-rw-r--r--core/src/fpdfapi/fpdf_font/font_int.h3
-rw-r--r--core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp5
-rw-r--r--core/src/fpdftext/unicodenormalization.cpp16
-rw-r--r--core/src/fpdftext/unicodenormalizationdata.cpp16
-rw-r--r--core/src/fpdftext/unicodenormalizationdata.h18
-rw-r--r--core/src/fxge/fontdata/chromefontdata/FoxitDingbats.c2
-rw-r--r--core/src/fxge/fontdata/chromefontdata/FoxitFixed.c2
-rw-r--r--core/src/fxge/fontdata/chromefontdata/FoxitFixedBold.c2
-rw-r--r--core/src/fxge/fontdata/chromefontdata/FoxitFixedBoldItalic.c2
-rw-r--r--core/src/fxge/fontdata/chromefontdata/FoxitFixedItalic.c2
-rw-r--r--core/src/fxge/fontdata/chromefontdata/FoxitSans.c2
-rw-r--r--core/src/fxge/fontdata/chromefontdata/FoxitSansBold.c2
-rw-r--r--core/src/fxge/fontdata/chromefontdata/FoxitSansBoldItalic.c2
-rw-r--r--core/src/fxge/fontdata/chromefontdata/FoxitSansItalic.c2
-rw-r--r--core/src/fxge/fontdata/chromefontdata/FoxitSansMM.c2
-rw-r--r--core/src/fxge/fontdata/chromefontdata/FoxitSerif.c2
-rw-r--r--core/src/fxge/fontdata/chromefontdata/FoxitSerifBold.c2
-rw-r--r--core/src/fxge/fontdata/chromefontdata/FoxitSerifBoldItalic.c2
-rw-r--r--core/src/fxge/fontdata/chromefontdata/FoxitSerifItalic.c2
-rw-r--r--core/src/fxge/fontdata/chromefontdata/FoxitSerifMM.c2
-rw-r--r--core/src/fxge/fontdata/chromefontdata/FoxitSymbol.c2
-rw-r--r--core/src/fxge/fontdata/chromefontdata/chromefontdata.h35
-rw-r--r--core/src/fxge/ge/fx_ge_fontmap.cpp19
25 files changed, 120 insertions, 49 deletions
diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h
index a83cec194c..ab48a95255 100644
--- a/core/include/fpdfapi/fpdf_parser.h
+++ b/core/include/fpdfapi/fpdf_parser.h
@@ -801,6 +801,14 @@ void FlateEncode(const uint8_t* src_buf,
FX_DWORD src_size,
uint8_t*& dest_buf,
FX_DWORD& dest_size);
+void FlateEncode(const uint8_t* src_buf,
+ FX_DWORD src_size,
+ int predictor,
+ int Colors,
+ int BitsPerComponent,
+ int Columns,
+ uint8_t*& dest_buf,
+ FX_DWORD& dest_size);
FX_DWORD FlateDecode(const uint8_t* src_buf,
FX_DWORD src_size,
uint8_t*& dest_buf,
@@ -809,6 +817,8 @@ FX_DWORD RunLengthDecode(const uint8_t* src_buf,
FX_DWORD src_size,
uint8_t*& dest_buf,
FX_DWORD& dest_size);
+FX_BOOL IsSignatureDict(const CPDF_Dictionary* pDict);
+
class CPDF_NumberTree {
public:
CPDF_NumberTree(CPDF_Dictionary* pRoot) { m_pRoot = pRoot; }
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
index 668c70b243..4e6c72355d 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
@@ -6,23 +6,12 @@
#include "../../../include/fxcrt/fx_ext.h"
#include "../../../include/fpdfapi/fpdf_serial.h"
+#include "../../../include/fpdfapi/fpdf_parser.h"
#include "editint.h"
#define PDF_OBJECTSTREAM_MAXLENGTH (256 * 1024)
#define PDF_XREFSTREAM_MAXSIZE 10000
-extern void FlateEncode(const uint8_t* src_buf,
- FX_DWORD src_data,
- uint8_t*& dest_buf,
- FX_DWORD& dest_size);
-extern void FlateEncode(const uint8_t* src_buf,
- FX_DWORD src_size,
- int predictor,
- int Colors,
- int BitsPerComponent,
- int Columns,
- uint8_t*& dest_buf,
- FX_DWORD& dest_size);
-extern FX_BOOL IsSignatureDict(const CPDF_Dictionary* pDict);
+
int32_t PDF_CreatorAppendObject(const CPDF_Object* pObj,
CFX_FileBufferArchive* pFile,
FX_FILESIZE& offset) {
diff --git a/core/src/fpdfapi/fpdf_font/font_int.h b/core/src/fpdfapi/fpdf_font/font_int.h
index 59acfcbd35..79c25219a0 100644
--- a/core/src/fpdfapi/fpdf_font/font_int.h
+++ b/core/src/fpdfapi/fpdf_font/font_int.h
@@ -19,6 +19,9 @@ class CPDF_Stream;
typedef void* FXFT_Library;
+short TT2PDF(int m, FXFT_Face face);
+FX_BOOL FT_UseTTCharmap(FXFT_Face face, int platform_id, int encoding_id);
+
class CPDF_CMapManager {
public:
CPDF_CMapManager();
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
index ebb99fad63..2fc1255989 100644
--- a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
+++ b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
@@ -12,11 +12,6 @@
#include "../fpdf_cmaps/cmap_int.h"
#include "font_int.h"
-extern short TT2PDF(int m, FXFT_Face face);
-extern FX_BOOL FT_UseTTCharmap(FXFT_Face face,
- int platform_id,
- int encoding_id);
-
CPDF_CMapManager::CPDF_CMapManager() {
m_bPrompted = FALSE;
FXSYS_memset(m_CID2UnicodeMaps, 0, sizeof m_CID2UnicodeMaps);
diff --git a/core/src/fpdftext/unicodenormalization.cpp b/core/src/fpdftext/unicodenormalization.cpp
index 446c6940eb..a7732967eb 100644
--- a/core/src/fpdftext/unicodenormalization.cpp
+++ b/core/src/fpdftext/unicodenormalization.cpp
@@ -5,15 +5,15 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../include/fxcrt/fx_string.h"
+#include "unicodenormalizationdata.h"
+
+const FX_WCHAR* const g_UnicodeData_Normalization_Maps[5] = {
+ nullptr,
+ g_UnicodeData_Normalization_Map1,
+ g_UnicodeData_Normalization_Map2,
+ g_UnicodeData_Normalization_Map3,
+ g_UnicodeData_Normalization_Map4};
-extern const FX_WCHAR g_UnicodeData_Normalization[];
-extern const FX_WCHAR g_UnicodeData_Normalization_Map1[];
-extern const FX_WCHAR g_UnicodeData_Normalization_Map2[];
-extern const FX_WCHAR g_UnicodeData_Normalization_Map3[];
-extern const FX_WCHAR g_UnicodeData_Normalization_Map4[];
-const FX_WCHAR* g_UnicodeData_Normalization_Maps[5] = {
- NULL, g_UnicodeData_Normalization_Map1, g_UnicodeData_Normalization_Map2,
- g_UnicodeData_Normalization_Map3, g_UnicodeData_Normalization_Map4};
FX_STRSIZE FX_Unicode_GetNormalization(FX_WCHAR wch, FX_WCHAR* pDst) {
wch = wch & 0xFFFF;
FX_WCHAR wFind = g_UnicodeData_Normalization[wch];
diff --git a/core/src/fpdftext/unicodenormalizationdata.cpp b/core/src/fpdftext/unicodenormalizationdata.cpp
index 8185a6467b..777d0404e6 100644
--- a/core/src/fpdftext/unicodenormalizationdata.cpp
+++ b/core/src/fpdftext/unicodenormalizationdata.cpp
@@ -5,7 +5,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../include/fxcrt/fx_system.h"
-extern const FX_WCHAR g_UnicodeData_Normalization[65536] = {
+#include "unicodenormalizationdata.h"
+
+const FX_WCHAR g_UnicodeData_Normalization[65536] = {
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,
@@ -7288,7 +7290,8 @@ extern const FX_WCHAR g_UnicodeData_Normalization[65536] = {
0x0000, 0x94F9, 0x94FA, 0x94FB, 0x94FC, 0x94FD, 0x94FE, 0x94FF, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000};
-extern const FX_WCHAR g_UnicodeData_Normalization_Map1[5376] = {
+
+const FX_WCHAR g_UnicodeData_Normalization_Map1[5376] = {
0x0066, 0x0053, 0x0053, 0x0059, 0x0020, 0x0308, 0x0061, 0x0052, 0x0304,
0x0032, 0x0033, 0x0301, 0x03BC, 0x0327, 0x0031, 0x006F, 0x0041, 0x0041,
0x0041, 0x0041, 0x0041, 0x0041, 0x0043, 0x0045, 0x0045, 0x0045, 0x0045,
@@ -7887,7 +7890,8 @@ extern const FX_WCHAR g_UnicodeData_Normalization_Map1[5376] = {
0x315D, 0x315E, 0x315F, 0x3160, 0x3161, 0x3162, 0x3163, 0x00A2, 0x00A3,
0x00AC, 0x00AF, 0x00A6, 0x00A5, 0x20A9, 0x2502, 0x2190, 0x2191, 0x2192,
0x2193, 0x25A0, 0x25CB};
-extern const FX_WCHAR g_UnicodeData_Normalization_Map2[1724] = {
+
+const FX_WCHAR g_UnicodeData_Normalization_Map2[1724] = {
0x004F, 0x0045, 0x0054, 0x004D, 0x006F, 0x0065, 0x0049, 0x004A, 0x0069,
0x006A, 0x004F, 0x0045, 0x006F, 0x0065, 0x0044, 0x017D, 0x0044, 0x017E,
0x0064, 0x017E, 0x004C, 0x004A, 0x004C, 0x006A, 0x006C, 0x006A, 0x004E,
@@ -8080,7 +8084,8 @@ extern const FX_WCHAR g_UnicodeData_Normalization_Map2[1724] = {
0x064F, 0x0640, 0x0650, 0x0640, 0x0651, 0x0640, 0x0652, 0x0644, 0x0622,
0x0644, 0x0622, 0x0644, 0x0623, 0x0644, 0x0623, 0x0644, 0x0625, 0x0644,
0x0625, 0x0644, 0x0627, 0x0644, 0x0627};
-extern const FX_WCHAR g_UnicodeData_Normalization_Map3[1164] = {
+
+const FX_WCHAR g_UnicodeData_Normalization_Map3[1164] = {
0x0031, 0x002F, 0x0034, 0x0031, 0x002F, 0x0032, 0x0033, 0x002F, 0x0034,
0x002E, 0x002E, 0x002E, 0x2032, 0x2032, 0x2032, 0x2035, 0x2035, 0x2035,
0x0061, 0x002F, 0x0063, 0x0061, 0x002F, 0x0073, 0x0063, 0x002F, 0x006F,
@@ -8211,7 +8216,8 @@ extern const FX_WCHAR g_UnicodeData_Normalization_Map3[1164] = {
0x0639, 0x062C, 0x0645, 0x0635, 0x0645, 0x0645, 0x0633, 0x062E, 0x064A,
0x0646, 0x062C, 0x064A, 0x0635, 0x0644, 0x06D2, 0x0642, 0x0644, 0x06D2,
0x0635, 0x0644, 0x0649};
-extern const FX_WCHAR g_UnicodeData_Normalization_Map4[488] = {
+
+const FX_WCHAR g_UnicodeData_Normalization_Map4[488] = {
0x0004, 0x2032, 0x2032, 0x2032, 0x2032, 0x0004, 0x0031, 0x002F, 0x0031,
0x0030, 0x0004, 0x0056, 0x0049, 0x0049, 0x0049, 0x0004, 0x0076, 0x0069,
0x0069, 0x0069, 0x0004, 0x0028, 0x0031, 0x0030, 0x0029, 0x0004, 0x0028,
diff --git a/core/src/fpdftext/unicodenormalizationdata.h b/core/src/fpdftext/unicodenormalizationdata.h
new file mode 100644
index 0000000000..1970f87ab3
--- /dev/null
+++ b/core/src/fpdftext/unicodenormalizationdata.h
@@ -0,0 +1,18 @@
+// 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_FPDFTEXT_UNICODENORMALIZATIONDATA_H_
+#define CORE_SRC_FPDFTEXT_UNICODENORMALIZATIONDATA_H_
+
+#include "../../include/fxcrt/fx_system.h"
+
+extern const FX_WCHAR g_UnicodeData_Normalization[];
+extern const FX_WCHAR g_UnicodeData_Normalization_Map1[];
+extern const FX_WCHAR g_UnicodeData_Normalization_Map2[];
+extern const FX_WCHAR g_UnicodeData_Normalization_Map3[];
+extern const FX_WCHAR g_UnicodeData_Normalization_Map4[];
+
+#endif // CORE_SRC_FPDFTEXT_UNICODENORMALIZATIONDATA_H_
diff --git a/core/src/fxge/fontdata/chromefontdata/FoxitDingbats.c b/core/src/fxge/fontdata/chromefontdata/FoxitDingbats.c
index b4c2ac132f..a653a097fa 100644
--- a/core/src/fxge/fontdata/chromefontdata/FoxitDingbats.c
+++ b/core/src/fxge/fontdata/chromefontdata/FoxitDingbats.c
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "chromefontdata.h"
+
const unsigned char g_FoxitDingbatsFontData [29513] = {0x1,
0x0, 0x4, 0x2, 0x0, 0x1, 0x1, 0x1, 0x11,
0x43, 0x68, 0x72, 0x6f, 0x6d, 0x44, 0x69, 0x6e,
diff --git a/core/src/fxge/fontdata/chromefontdata/FoxitFixed.c b/core/src/fxge/fontdata/chromefontdata/FoxitFixed.c
index 8bae0fa82b..af224b448f 100644
--- a/core/src/fxge/fontdata/chromefontdata/FoxitFixed.c
+++ b/core/src/fxge/fontdata/chromefontdata/FoxitFixed.c
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "chromefontdata.h"
+
const unsigned char g_FoxitFixedFontData [17597] = {0x1,
0x0, 0x4, 0x2, 0x0, 0x1, 0x1, 0x1, 0xe,
0x43, 0x68, 0x72, 0x6f, 0x6d, 0x46, 0x69, 0x78,
diff --git a/core/src/fxge/fontdata/chromefontdata/FoxitFixedBold.c b/core/src/fxge/fontdata/chromefontdata/FoxitFixedBold.c
index eb4fb8f5d6..e4de5f59fa 100644
--- a/core/src/fxge/fontdata/chromefontdata/FoxitFixedBold.c
+++ b/core/src/fxge/fontdata/chromefontdata/FoxitFixedBold.c
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "chromefontdata.h"
+
const unsigned char g_FoxitFixedBoldFontData [18055] = {0x1,
0x0, 0x4, 0x2, 0x0, 0x1, 0x1, 0x1, 0x13,
0x43, 0x68, 0x72, 0x6f, 0x6d, 0x46, 0x69, 0x78,
diff --git a/core/src/fxge/fontdata/chromefontdata/FoxitFixedBoldItalic.c b/core/src/fxge/fontdata/chromefontdata/FoxitFixedBoldItalic.c
index 45847f671c..8a90043b40 100644
--- a/core/src/fxge/fontdata/chromefontdata/FoxitFixedBoldItalic.c
+++ b/core/src/fxge/fontdata/chromefontdata/FoxitFixedBoldItalic.c
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "chromefontdata.h"
+
const unsigned char g_FoxitFixedBoldItalicFontData [19151] = {0x1,
0x0, 0x4, 0x2, 0x0, 0x1, 0x1, 0x1, 0x19,
0x43, 0x68, 0x72, 0x6f, 0x6d, 0x46, 0x69, 0x78,
diff --git a/core/src/fxge/fontdata/chromefontdata/FoxitFixedItalic.c b/core/src/fxge/fontdata/chromefontdata/FoxitFixedItalic.c
index d8409bab29..87d7da09f6 100644
--- a/core/src/fxge/fontdata/chromefontdata/FoxitFixedItalic.c
+++ b/core/src/fxge/fontdata/chromefontdata/FoxitFixedItalic.c
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "chromefontdata.h"
+
const unsigned char g_FoxitFixedItalicFontData [18746] = {0x1,
0x0, 0x4, 0x2, 0x0, 0x1, 0x1, 0x1, 0x15,
0x43, 0x68, 0x72, 0x6f, 0x6d, 0x46, 0x69, 0x78,
diff --git a/core/src/fxge/fontdata/chromefontdata/FoxitSans.c b/core/src/fxge/fontdata/chromefontdata/FoxitSans.c
index cd87d2b5ba..48465fc6c5 100644
--- a/core/src/fxge/fontdata/chromefontdata/FoxitSans.c
+++ b/core/src/fxge/fontdata/chromefontdata/FoxitSans.c
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "chromefontdata.h"
+
const unsigned char g_FoxitSansFontData [15025] = {0x1,
0x0, 0x4, 0x2, 0x0, 0x1, 0x1, 0x1, 0xd,
0x43, 0x68, 0x72, 0x6f, 0x6d, 0x53, 0x61, 0x6e,
diff --git a/core/src/fxge/fontdata/chromefontdata/FoxitSansBold.c b/core/src/fxge/fontdata/chromefontdata/FoxitSansBold.c
index 594b37fe93..81507983a5 100644
--- a/core/src/fxge/fontdata/chromefontdata/FoxitSansBold.c
+++ b/core/src/fxge/fontdata/chromefontdata/FoxitSansBold.c
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "chromefontdata.h"
+
const unsigned char g_FoxitSansBoldFontData [16344] = {0x1,
0x0, 0x4, 0x2, 0x0, 0x1, 0x1, 0x1, 0x12,
0x43, 0x68, 0x72, 0x6f, 0x6d, 0x53, 0x61, 0x6e,
diff --git a/core/src/fxge/fontdata/chromefontdata/FoxitSansBoldItalic.c b/core/src/fxge/fontdata/chromefontdata/FoxitSansBoldItalic.c
index 0555165be3..91200e1026 100644
--- a/core/src/fxge/fontdata/chromefontdata/FoxitSansBoldItalic.c
+++ b/core/src/fxge/fontdata/chromefontdata/FoxitSansBoldItalic.c
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "chromefontdata.h"
+
const unsigned char g_FoxitSansBoldItalicFontData [16418] = {0x1,
0x0, 0x4, 0x2, 0x0, 0x1, 0x1, 0x1, 0x17,
0x43, 0x68, 0x72, 0x6f, 0x6d, 0x53, 0x61, 0x6e,
diff --git a/core/src/fxge/fontdata/chromefontdata/FoxitSansItalic.c b/core/src/fxge/fontdata/chromefontdata/FoxitSansItalic.c
index 9ac2edec66..ce6454e885 100644
--- a/core/src/fxge/fontdata/chromefontdata/FoxitSansItalic.c
+++ b/core/src/fxge/fontdata/chromefontdata/FoxitSansItalic.c
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "chromefontdata.h"
+
const unsigned char g_FoxitSansItalicFontData [16339] = {0x1,
0x0, 0x4, 0x2, 0x0, 0x1, 0x1, 0x1, 0x14,
0x43, 0x68, 0x72, 0x6f, 0x6d, 0x53, 0x61, 0x6e,
diff --git a/core/src/fxge/fontdata/chromefontdata/FoxitSansMM.c b/core/src/fxge/fontdata/chromefontdata/FoxitSansMM.c
index 05b0a16372..dd138281c7 100644
--- a/core/src/fxge/fontdata/chromefontdata/FoxitSansMM.c
+++ b/core/src/fxge/fontdata/chromefontdata/FoxitSansMM.c
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "chromefontdata.h"
+
const unsigned char g_FoxitSansMMFontData [66919] = {
0x80, 0x01, 0xD2, 0x29, 0x00, 0x00, 0x25, 0x21, 0x50, 0x53, 0x2D, 0x41, 0x64, 0x6F, 0x62, 0x65,
0x46, 0x6F, 0x6E, 0x74, 0x2D, 0x31, 0x2E, 0x30, 0x3A, 0x20, 0x43, 0x68, 0x72, 0x6f, 0x6d, 0x65, 0x53,
diff --git a/core/src/fxge/fontdata/chromefontdata/FoxitSerif.c b/core/src/fxge/fontdata/chromefontdata/FoxitSerif.c
index ccb12ed346..6f0c242351 100644
--- a/core/src/fxge/fontdata/chromefontdata/FoxitSerif.c
+++ b/core/src/fxge/fontdata/chromefontdata/FoxitSerif.c
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "chromefontdata.h"
+
const unsigned char g_FoxitSerifFontData [19469] = {0x1,
0x0, 0x4, 0x2, 0x0, 0x1, 0x1, 0x1, 0xe,
0x43, 0x68, 0x72, 0x6f, 0x6d, 0x53, 0x65, 0x72,
diff --git a/core/src/fxge/fontdata/chromefontdata/FoxitSerifBold.c b/core/src/fxge/fontdata/chromefontdata/FoxitSerifBold.c
index ba879bdfea..5f8a3739ad 100644
--- a/core/src/fxge/fontdata/chromefontdata/FoxitSerifBold.c
+++ b/core/src/fxge/fontdata/chromefontdata/FoxitSerifBold.c
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "chromefontdata.h"
+
const unsigned char g_FoxitSerifBoldFontData [19395] = {0x1,
0x0, 0x4, 0x2, 0x0, 0x1, 0x1, 0x1, 0x13,
0x43, 0x68, 0x72, 0x6f, 0x6d, 0x53, 0x65, 0x72,
diff --git a/core/src/fxge/fontdata/chromefontdata/FoxitSerifBoldItalic.c b/core/src/fxge/fontdata/chromefontdata/FoxitSerifBoldItalic.c
index 63f86960eb..162bf496c2 100644
--- a/core/src/fxge/fontdata/chromefontdata/FoxitSerifBoldItalic.c
+++ b/core/src/fxge/fontdata/chromefontdata/FoxitSerifBoldItalic.c
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "chromefontdata.h"
+
const unsigned char g_FoxitSerifBoldItalicFontData [20733] = {0x1,
0x0, 0x4, 0x2, 0x0, 0x1, 0x1, 0x1, 0x19,
0x43, 0x68, 0x72, 0x6f, 0x6d, 0x53, 0x65, 0x72,
diff --git a/core/src/fxge/fontdata/chromefontdata/FoxitSerifItalic.c b/core/src/fxge/fontdata/chromefontdata/FoxitSerifItalic.c
index 26f7784c60..ff353f7a8c 100644
--- a/core/src/fxge/fontdata/chromefontdata/FoxitSerifItalic.c
+++ b/core/src/fxge/fontdata/chromefontdata/FoxitSerifItalic.c
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "chromefontdata.h"
+
const unsigned char g_FoxitSerifItalicFontData [21227] = {0x1,
0x0, 0x4, 0x2, 0x0, 0x1, 0x1, 0x1, 0x15,
0x43, 0x68, 0x72, 0x6f, 0x6d, 0x53, 0x65, 0x72,
diff --git a/core/src/fxge/fontdata/chromefontdata/FoxitSerifMM.c b/core/src/fxge/fontdata/chromefontdata/FoxitSerifMM.c
index 44062cd210..49478b65d7 100644
--- a/core/src/fxge/fontdata/chromefontdata/FoxitSerifMM.c
+++ b/core/src/fxge/fontdata/chromefontdata/FoxitSerifMM.c
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "chromefontdata.h"
+
const unsigned char g_FoxitSerifMMFontData [113417] = {
0x80, 0x01, 0xD6, 0x29, 0x00, 0x00, 0x25, 0x21, 0x50, 0x53, 0x2D, 0x41, 0x64, 0x6F, 0x62, 0x65,
0x46, 0x6F, 0x6E, 0x74, 0x2D, 0x31, 0x2E, 0x30, 0x3A, 0x20, 0x43, 0x68, 0x72, 0x6f, 0x6d, 0x65, 0x53,
diff --git a/core/src/fxge/fontdata/chromefontdata/FoxitSymbol.c b/core/src/fxge/fontdata/chromefontdata/FoxitSymbol.c
index 18cde34c66..465a2361ed 100644
--- a/core/src/fxge/fontdata/chromefontdata/FoxitSymbol.c
+++ b/core/src/fxge/fontdata/chromefontdata/FoxitSymbol.c
@@ -4,6 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "chromefontdata.h"
+
const unsigned char g_FoxitSymbolFontData [16729] = {0x1,
0x0, 0x4, 0x2, 0x0, 0x1, 0x1, 0x1, 0xf,
0x43, 0x68, 0x72, 0x6f, 0x6d, 0x53, 0x79, 0x6d,
diff --git a/core/src/fxge/fontdata/chromefontdata/chromefontdata.h b/core/src/fxge/fontdata/chromefontdata/chromefontdata.h
new file mode 100644
index 0000000000..9b640568e5
--- /dev/null
+++ b/core/src/fxge/fontdata/chromefontdata/chromefontdata.h
@@ -0,0 +1,35 @@
+// 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_FXGE_FONTDATA_CHROMEFONTDATA_CHROMEFONTDATA_H_
+#define CORE_SRC_FXGE_FONTDATA_CHROMEFONTDATA_CHROMEFONTDATA_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern const unsigned char g_FoxitFixedItalicFontData[18746];
+extern const unsigned char g_FoxitFixedFontData[17597];
+extern const unsigned char g_FoxitSansItalicFontData[16339];
+extern const unsigned char g_FoxitSansFontData[15025];
+extern const unsigned char g_FoxitSerifItalicFontData[21227];
+extern const unsigned char g_FoxitSerifFontData[19469];
+extern const unsigned char g_FoxitFixedBoldItalicFontData[19151];
+extern const unsigned char g_FoxitFixedBoldFontData[18055];
+extern const unsigned char g_FoxitSansBoldItalicFontData[16418];
+extern const unsigned char g_FoxitSansBoldFontData[16344];
+extern const unsigned char g_FoxitSerifBoldItalicFontData[20733];
+extern const unsigned char g_FoxitSerifBoldFontData[19395];
+extern const unsigned char g_FoxitSymbolFontData[16729];
+extern const unsigned char g_FoxitDingbatsFontData[29513];
+extern const unsigned char g_FoxitSerifMMFontData[113417];
+extern const unsigned char g_FoxitSansMMFontData[66919];
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // CORE_SRC_FXGE_FONTDATA_CHROMEFONTDATA_CHROMEFONTDATA_H_
diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp
index 686e941c54..cc4dc07106 100644
--- a/core/src/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/src/fxge/ge/fx_ge_fontmap.cpp
@@ -8,6 +8,7 @@
#include "../../../include/fxge/fx_ge.h"
#include "../../../include/fxge/fx_freetype.h"
+#include "../fontdata/chromefontdata/chromefontdata.h"
#include "text_int.h"
#define GET_TT_SHORT(w) (FX_WORD)(((w)[0] << 8) | (w)[1])
@@ -406,24 +407,6 @@ void CFX_FontMgr::ReleaseFace(FXFT_Face face) {
FXFT_Done_Face(face);
}
}
-extern "C" {
-extern const unsigned char g_FoxitFixedItalicFontData[18746];
-extern const unsigned char g_FoxitFixedFontData[17597];
-extern const unsigned char g_FoxitSansItalicFontData[16339];
-extern const unsigned char g_FoxitSansFontData[15025];
-extern const unsigned char g_FoxitSerifItalicFontData[21227];
-extern const unsigned char g_FoxitSerifFontData[19469];
-extern const unsigned char g_FoxitFixedBoldItalicFontData[19151];
-extern const unsigned char g_FoxitFixedBoldFontData[18055];
-extern const unsigned char g_FoxitSansBoldItalicFontData[16418];
-extern const unsigned char g_FoxitSansBoldFontData[16344];
-extern const unsigned char g_FoxitSerifBoldItalicFontData[20733];
-extern const unsigned char g_FoxitSerifBoldFontData[19395];
-extern const unsigned char g_FoxitSymbolFontData[16729];
-extern const unsigned char g_FoxitDingbatsFontData[29513];
-extern const unsigned char g_FoxitSerifMMFontData[113417];
-extern const unsigned char g_FoxitSansMMFontData[66919];
-};
const FoxitFonts g_FoxitFonts[14] = {
{g_FoxitFixedFontData, 17597},
{g_FoxitFixedBoldFontData, 18055},