summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/pdfwindow/PWL_FontMap.cpp')
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_FontMap.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
index fadea905d4..e418e8b380 100644
--- a/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_FontMap.cpp
@@ -4,14 +4,13 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/include/pdfwindow/PDFWindow.h"
#include "fpdfsdk/include/pdfwindow/PWL_FontMap.h"
+
+#include "core/include/fpdfapi/fpdf_module.h"
#include "fpdfsdk/include/pdfwindow/PWL_Wnd.h"
#define DEFAULT_FONT_NAME "Helvetica"
-/* ------------------------------ CPWL_FontMap ------------------------------ */
-
CPWL_FontMap::CPWL_FontMap(IFX_SystemHandler* pSystemHandler)
: m_pPDFDoc(NULL), m_pSystemHandler(pSystemHandler) {
ASSERT(m_pSystemHandler);
@@ -239,13 +238,6 @@ int32_t CPWL_FontMap::GetPWLFontIndex(FX_WORD word, int32_t nCharset) {
if (!pNewFont)
return -1;
- /*
- if (CPDF_Font* pFont = GetPDFFont(nFind))
- {
- PWLFont.AddWordToFontDict(pFontDict, word);
- }
- */
-
CFX_ByteString sAlias = EncodeFontAlias("Arial_Chrome", nCharset);
AddedFont(pNewFont, sAlias);
@@ -313,9 +305,9 @@ CPDF_Font* CPWL_FontMap::AddStandardFont(CPDF_Document* pDoc,
CPDF_Font* pFont = NULL;
- if (sFontName == "ZapfDingbats")
+ if (sFontName == "ZapfDingbats") {
pFont = pDoc->AddStandardFont(sFontName, NULL);
- else {
+ } else {
CPDF_FontEncoding fe(PDFFONT_ENCODING_WINANSI);
pFont = pDoc->AddStandardFont(sFontName, &fe);
}
@@ -499,8 +491,6 @@ int32_t CPWL_FontMap::CharSetFromUnicode(FX_WORD word, int32_t nOldCharset) {
return ANSI_CHARSET;
}
-/* ------------------------ CPWL_DocFontMap ------------------------ */
-
CPWL_DocFontMap::CPWL_DocFontMap(IFX_SystemHandler* pSystemHandler,
CPDF_Document* pAttachedDoc)
: CPWL_FontMap(pSystemHandler), m_pAttachedDoc(pAttachedDoc) {}