diff options
author | dsinclair <dsinclair@chromium.org> | 2016-06-23 08:18:36 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-23 08:18:36 -0700 |
commit | ab5b60edba7e8e80d7ee964d58e58b384fcfe5ee (patch) | |
tree | 325ebf9ebc36988ebfcda1da22a17e4b12e531b8 | |
parent | decfa7b0447538dec6cbcfa8ea50481f2173ce12 (diff) | |
download | pdfium-ab5b60edba7e8e80d7ee964d58e58b384fcfe5ee.tar.xz |
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
-rw-r--r-- | fpdfsdk/fpdfview.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
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<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) |