Commit cc6d872e authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov

git-svn-id:...

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@54110 954022d7-b5bf-4e40-9824-e11837661b57
parent c79c65e7
...@@ -481,5 +481,17 @@ BOOL CFontManager::LoadFontFromFile(const std::wstring& sPath, const int& lFaceI ...@@ -481,5 +481,17 @@ BOOL CFontManager::LoadFontFromFile(const std::wstring& sPath, const int& lFaceI
m_pFont->m_pFontManager = this; m_pFont->m_pFontManager = this;
m_pFont->SetSizeAndDpi(dSize, (UINT)dDpiX, (UINT)dDpiY); m_pFont->SetSizeAndDpi(dSize, (UINT)dDpiX, (UINT)dDpiY);
return TRUE;
}
BOOL CFontManager::LoadFontFromFile2(CFontsCache* pCache, const std::wstring& sPath, const int& lFaceIndex, const double& dSize, const double& dDpiX, const double& dDpiY)
{
if (NULL == pCache)
return FALSE;
m_pFont = pCache->LockFont(m_pLibrary, sPath, lFaceIndex, dSize);
m_pFont->m_pFontManager = this;
m_pFont->SetSizeAndDpi(dSize, (UINT)dDpiX, (UINT)dDpiY);
return TRUE; return TRUE;
} }
\ No newline at end of file
...@@ -49,6 +49,7 @@ private: ...@@ -49,6 +49,7 @@ private:
CApplicationFontStreams* m_pApplicationFontStreams; CApplicationFontStreams* m_pApplicationFontStreams;
public: public:
inline void SetStreams(CApplicationFontStreams* pStreams) { m_pApplicationFontStreams = pStreams; }
CFontFile* LockFont(FT_Library library, const std::wstring& strFileName, const LONG& lFaceIndex, const double& dSize); CFontFile* LockFont(FT_Library library, const std::wstring& strFileName, const LONG& lFaceIndex, const double& dSize);
}; };
...@@ -115,6 +116,7 @@ public: ...@@ -115,6 +116,7 @@ public:
BOOL LoadFontByName(const std::wstring& sName, const double& dSize, const LONG& lStyle, const double& dDpiX, const double& dDpiY); BOOL LoadFontByName(const std::wstring& sName, const double& dSize, const LONG& lStyle, const double& dDpiX, const double& dDpiY);
BOOL LoadFontFromFile(const std::wstring& sPath, const int& lFaceIndex, const double& dSize, const double& dDpiX, const double& dDpiY); BOOL LoadFontFromFile(const std::wstring& sPath, const int& lFaceIndex, const double& dSize, const double& dDpiX, const double& dDpiY);
BOOL LoadFontFromFile2(CFontsCache* pCache, const std::wstring& sPath, const int& lFaceIndex, const double& dSize, const double& dDpiX, const double& dDpiY);
public: public:
static CFontFile* LoadFontFile(FT_Library library, CFontStream* pStream, LONG lFaceIndex); static CFontFile* LoadFontFile(FT_Library library, CFontStream* pStream, LONG lFaceIndex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment