Commit 24de7849 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@52335 954022d7-b5bf-4e40-9824-e11837661b57
parent bc470ac5
...@@ -572,6 +572,11 @@ public: ...@@ -572,6 +572,11 @@ public:
m_nCacheAssoc = 0; m_nCacheAssoc = 0;
} }
~CFreeTypeFont() ~CFreeTypeFont()
{
CloseFile();
}
void CloseFile()
{ {
if (NULL != m_pFace) if (NULL != m_pFace)
FT_Done_Face(m_pFace); FT_Done_Face(m_pFace);
...@@ -582,6 +587,11 @@ public: ...@@ -582,6 +587,11 @@ public:
CloseHandle( m_hMapFile ); CloseHandle( m_hMapFile );
if ( m_hFile ) if ( m_hFile )
CloseHandle( m_hFile ); CloseHandle( m_hFile );
m_pFace = NULL;
m_pBaseAddress = NULL;
m_hFile = NULL;
m_hMapFile = NULL;
} }
void InitCache() void InitCache()
...@@ -2009,6 +2019,8 @@ public: ...@@ -2009,6 +2019,8 @@ public:
public: public:
BOOL LoadFont(FT_Library pLibrary, wchar_t* wsFileName, long lIndex, BOOL bUseAA, BOOL bUseKern) BOOL LoadFont(FT_Library pLibrary, wchar_t* wsFileName, long lIndex, BOOL bUseAA, BOOL bUseKern)
{ {
CloseFile();
FT_Face pFace = NULL; FT_Face pFace = NULL;
// //
...@@ -2230,13 +2242,13 @@ public: ...@@ -2230,13 +2242,13 @@ public:
~CFontManagerLight() ~CFontManagerLight()
{ {
RELEASEOBJECT(m_pFont);
if (NULL != m_pLibrary) if (NULL != m_pLibrary)
{ {
FT_Done_FreeType(m_pLibrary); FT_Done_FreeType(m_pLibrary);
m_pLibrary = NULL; m_pLibrary = NULL;
} }
RELEASEOBJECT(m_pFont);
} }
BOOL LoadFontFromFile(CString sSrcPath, float fEmSize, double dHorDpi, double dVerDpi, long lFaceIndex) BOOL LoadFontFromFile(CString sSrcPath, float fEmSize, double dHorDpi, double dVerDpi, 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