diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-08-13 11:52:45 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-08-13 11:52:45 -0700 |
commit | 9311163b564785a3a3ccdcb09bd3b7d0b2976d1a (patch) | |
tree | a6bb01ee4e1f43ad6659baa1c24fac729bcd5033 /fpdfsdk/src/fpdfview.cpp | |
parent | 98367f3ef7dc76c856db1c8a3721bef5f9b7adfc (diff) | |
download | pdfium-9311163b564785a3a3ccdcb09bd3b7d0b2976d1a.tar.xz |
Allow external font-path configuration from pdfium_test.
R=thestig@chromium.org
Committed: https://pdfium.googlesource.com/pdfium/+/d8b5e73d8609b74e6a995ee1768d20d47bd4b089
Review URL: https://codereview.chromium.org/1268323004 .
Diffstat (limited to 'fpdfsdk/src/fpdfview.cpp')
-rw-r--r-- | fpdfsdk/src/fpdfview.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp index 9ad3384803..2700aebddc 100644 --- a/fpdfsdk/src/fpdfview.cpp +++ b/fpdfsdk/src/fpdfview.cpp @@ -91,9 +91,14 @@ CFontMapper* g_pFontMapper = NULL; #endif // #if _FX_OS_ == _FX_LINUX_EMBEDDED_ DLLEXPORT void STDCALL FPDF_InitLibrary() { + FPDF_InitLibraryWithConfig(nullptr); +} + +DLLEXPORT void STDCALL FPDF_InitLibraryWithConfig( + const FPDF_LIBRARY_CONFIG* cfg) { g_pCodecModule = new CCodec_ModuleMgr(); - CFX_GEModule::Create(); + CFX_GEModule::Create(cfg ? cfg->m_pUserFontPaths : nullptr); CFX_GEModule::Get()->SetCodecModule(g_pCodecModule); CPDF_ModuleMgr::Create(); |