}
}
-#ifndef _T
-#define _T(x) x
-#endif
-
CCodec_ModuleMgr* g_pCodecModule = nullptr;
#if _FX_OS_ == _FX_LINUX_EMBEDDED_
class CFontMapper : public IPDF_FontMapper {
public:
CFontMapper();
- virtual ~CFontMapper();
+ ~CFontMapper() override;
- virtual FT_Face FindSubstFont(
+ // IPDF_FontMapper
+ FT_Face FindSubstFont(
CPDF_Document* pDoc, // [IN] The PDF document
const CFX_ByteString& face_name, // [IN] Original name
FX_BOOL bTrueType, // [IN] TrueType or Type1
int CharsetCP, // [IN] code page for charset (see Win32 GetACP())
FX_BOOL bVertical,
CPDF_SubstFont* pSubstFont // [OUT] Subst font data
- );
+ ) override;
FT_Face m_SysFace;
};
#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();
return FSDK_SetSandBoxPolicy(policy, enable);
}
-
DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_LoadDocument(FPDF_STRING file_path,
FPDF_BYTESTRING password) {
// NOTE: the creation of the file needs to be by the embedder on the
return pParser->GetDocument();
}
-extern void CheckUnSupportError(CPDF_Document* pDoc, FX_DWORD err_code);
-
class CMemFile final : public IFX_FileRead {
public:
CMemFile(uint8_t* pBuf, FX_FILESIZE size) : m_pBuf(pBuf), m_size(size) {}
}
private:
+ ~CMemFile() {}
+
uint8_t* m_pBuf;
FX_FILESIZE m_size;
};