diff --git a/PdfFile/PdfFile.cpp b/PdfFile/PdfFile.cpp index f959237575..249beee837 100644 --- a/PdfFile/PdfFile.cpp +++ b/PdfFile/PdfFile.cpp @@ -425,6 +425,12 @@ BYTE* CPdfFile::GetAnnotStandardFonts() return NULL; return m_pInternal->pReader->GetFonts(true); } +std::wstring CPdfFile::GetFontPath(const std::wstring& wsFontName) +{ + if (!m_pInternal->pReader) + return L""; + return m_pInternal->pReader->GetFontPath(wsFontName, false); +} std::wstring CPdfFile::GetEmbeddedFontPath(const std::wstring& wsFontName) { if (!m_pInternal->pReader) diff --git a/PdfFile/PdfFile.h b/PdfFile/PdfFile.h index 13a446fb8e..8c3073a211 100644 --- a/PdfFile/PdfFile.h +++ b/PdfFile/PdfFile.h @@ -136,6 +136,7 @@ public: BYTE* GetAPWidget (int nRasterW, int nRasterH, int nBackgroundColor, int nPageIndex, int nWidget = -1, const char* sView = NULL, const char* sBView = NULL); BYTE* GetAPAnnots (int nRasterW, int nRasterH, int nBackgroundColor, int nPageIndex, int nAnnot = -1, const char* sView = NULL); BYTE* GetButtonIcon(int nBackgroundColor, int nPageIndex, bool bBase64 = false, int nBWidget = -1, const char* sIView = NULL); + std::wstring GetFontPath(const std::wstring& wsFontName); std::wstring GetEmbeddedFontPath(const std::wstring& wsFontName); // --- WRITER --- diff --git a/PdfFile/PdfReader.h b/PdfFile/PdfReader.h index 7c287db8ca..e2b70438bf 100644 --- a/PdfFile/PdfReader.h +++ b/PdfFile/PdfReader.h @@ -65,7 +65,7 @@ public: void GetPageInfo(int nPageIndex, double* pdWidth, double* pdHeight, double* pdDpiX, double* pdDpiY); void DrawPageOnRenderer(IRenderer* pRenderer, int nPageIndex, bool* pBreak); std::wstring GetInfo(); - std::wstring GetFontPath(const std::wstring& wsFontName, bool bSave = false); + std::wstring GetFontPath(const std::wstring& wsFontName, bool bSave = true); std::wstring ToXml(const std::wstring& wsXmlPath, bool isPrintStreams = false); void ChangeLength(DWORD nLength);