summaryrefslogtreecommitdiff
path: root/fpdfsdk/pdfwindow/PWL_FontMap.h
diff options
context:
space:
mode:
authornpm <npm@chromium.org>2016-09-19 07:24:33 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-19 07:24:33 -0700
commitea3c3be83dae12ef682c68fc7cf906d790fd9f84 (patch)
treecdaca6bc4a4b9de627e45b90c64d4bd197fd8940 /fpdfsdk/pdfwindow/PWL_FontMap.h
parent2f8568ef91156d2deb8411c427fbb52f880ccc34 (diff)
downloadpdfium-ea3c3be83dae12ef682c68fc7cf906d790fd9f84.tar.xz
Remove duplicated charset definitions, and move them to fx_font.h
PWL_FontMap does not need its own charset definitions. fx_edit.h does not need to define DEFAULT_CHARSET. XFA have their own definitions. They look different in that most are MAC or MSWin charset definitions. So they are left untouched. public/fpdf_sysfontinfo.h duplicate ones were left untouched due to being in public folder. Review-Url: https://codereview.chromium.org/2347313002
Diffstat (limited to 'fpdfsdk/pdfwindow/PWL_FontMap.h')
-rw-r--r--fpdfsdk/pdfwindow/PWL_FontMap.h27
1 files changed, 3 insertions, 24 deletions
diff --git a/fpdfsdk/pdfwindow/PWL_FontMap.h b/fpdfsdk/pdfwindow/PWL_FontMap.h
index 0ebd059b08..bb3925d5c2 100644
--- a/fpdfsdk/pdfwindow/PWL_FontMap.h
+++ b/fpdfsdk/pdfwindow/PWL_FontMap.h
@@ -10,6 +10,7 @@
#include <memory>
#include "core/fpdfdoc/include/ipvt_fontmap.h"
+#include "core/fxge/include/fx_font.h"
#include "fpdfsdk/fxedit/include/fx_edit.h"
#include "public/fpdf_sysfontinfo.h"
@@ -27,28 +28,6 @@ struct CPWL_FontMap_Native {
CFX_ByteString sFontName;
};
-#ifndef ANSI_CHARSET
-
-#define ANSI_CHARSET 0
-#define DEFAULT_CHARSET 1
-#define SYMBOL_CHARSET 2
-#define SHIFTJIS_CHARSET 128
-#define HANGUL_CHARSET 129
-#define GB2312_CHARSET 134
-#define CHINESEBIG5_CHARSET 136
-#define JOHAB_CHARSET 130
-#define HEBREW_CHARSET 177
-#define ARABIC_CHARSET 178
-#define GREEK_CHARSET 161
-#define TURKISH_CHARSET 162
-#define VIETNAMESE_CHARSET 163
-#define THAI_CHARSET 222
-#define EASTEUROPE_CHARSET 238
-#define RUSSIAN_CHARSET 204
-#define BALTIC_CHARSET 186
-
-#endif
-
class CPWL_FontMap : public IPVT_FontMap {
public:
CPWL_FontMap(CFX_SystemHandler* pSystemHandler);
@@ -85,7 +64,7 @@ class CPWL_FontMap : public IPVT_FontMap {
FX_BOOL bFind);
int32_t AddFontData(CPDF_Font* pFont,
const CFX_ByteString& sFontAlias,
- int32_t nCharset = DEFAULT_CHARSET);
+ int32_t nCharset = FXFONT_DEFAULT_CHARSET);
CFX_ByteString EncodeFontAlias(const CFX_ByteString& sFontName,
int32_t nCharset);
@@ -96,7 +75,7 @@ class CPWL_FontMap : public IPVT_FontMap {
private:
int32_t FindFont(const CFX_ByteString& sFontName,
- int32_t nCharset = DEFAULT_CHARSET);
+ int32_t nCharset = FXFONT_DEFAULT_CHARSET);
CFX_ByteString GetNativeFont(int32_t nCharset);
CPDF_Font* AddFontToDocument(CPDF_Document* pDoc,