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
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp
index 6521eb8..38d704d 100644
--- a/fpdfsdk/fpdfview.cpp
+++ b/fpdfsdk/fpdfview.cpp
@@ -267,16 +267,15 @@
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<v8::Isolate*>(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)