From ab5b60edba7e8e80d7ee964d58e58b384fcfe5ee Mon Sep 17 00:00:00 2001 From: dsinclair Date: Thu, 23 Jun 2016 08:18:36 -0700 Subject: Load font maps in XFA. When XFA is enabled documents using some unicode fonts will render incorrectly as seen in the example attached to chromium:617490. This CL enables the loading of the font map files in XFA so we can correctly identify the character sets as unicode and map the glyphs correctly. BUG=chromium:617490 Review-Url: https://codereview.chromium.org/2097523002 --- fpdfsdk/fpdfview.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'fpdfsdk/fpdfview.cpp') diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp index 6521eb854a..38d704d27e 100644 --- a/fpdfsdk/fpdfview.cpp +++ b/fpdfsdk/fpdfview.cpp @@ -267,16 +267,15 @@ FPDF_InitLibraryWithConfig(const FPDF_LIBRARY_CONFIG* cfg) { CPDF_ModuleMgr* pModuleMgr = CPDF_ModuleMgr::Get(); pModuleMgr->SetCodecModule(g_pCodecModule); pModuleMgr->InitPageModule(); + pModuleMgr->LoadEmbeddedGB1CMaps(); + pModuleMgr->LoadEmbeddedJapan1CMaps(); + pModuleMgr->LoadEmbeddedCNS1CMaps(); + pModuleMgr->LoadEmbeddedKorea1CMaps(); #ifdef PDF_ENABLE_XFA CPDFXFA_App::GetInstance()->Initialize( (cfg && cfg->version >= 2) ? static_cast(cfg->m_pIsolate) : nullptr); -#else // PDF_ENABLE_XFA - pModuleMgr->LoadEmbeddedGB1CMaps(); - pModuleMgr->LoadEmbeddedJapan1CMaps(); - pModuleMgr->LoadEmbeddedCNS1CMaps(); - pModuleMgr->LoadEmbeddedKorea1CMaps(); #endif // PDF_ENABLE_XFA if (cfg && cfg->version >= 2) -- cgit v1.2.3