mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
CloseFont
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62504 954022d7-b5bf-4e40-9824-e11837661b57
This commit is contained in:
committed by
Alexander Trofimov
parent
4fcc2101c8
commit
f993d2a663
@ -629,6 +629,13 @@ INT CFontManager::LoadFontFromFile2(CFontsCache* pCache, const std::wstring& sPa
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void CFontManager::CloseFont()
|
||||
{
|
||||
this->m_pFont->ClearCache();
|
||||
this->m_pFont = NULL;
|
||||
}
|
||||
|
||||
std::wstring CFontManager::GetFontType() const
|
||||
{
|
||||
if (!m_pFont)
|
||||
|
||||
@ -58,12 +58,17 @@ public:
|
||||
m_pApplicationFontStreams = NULL;
|
||||
}
|
||||
~CFontsCache()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
void Clear()
|
||||
{
|
||||
for (std::map<std::string, CFontFile*>::iterator iter = m_mapFiles.begin(); iter != m_mapFiles.end(); ++iter)
|
||||
{
|
||||
CFontFile* pFile = iter->second;
|
||||
RELEASEOBJECT(pFile);
|
||||
}
|
||||
m_mapFiles.clear();
|
||||
}
|
||||
|
||||
public:
|
||||
@ -142,6 +147,7 @@ public:
|
||||
INT LoadFontByName(const std::wstring& sName, const double& dSize, const LONG& lStyle, const double& dDpiX, const double& dDpiY);
|
||||
INT LoadFontFromFile(const std::wstring& sPath, const int& lFaceIndex, const double& dSize, const double& dDpiX, const double& dDpiY);
|
||||
INT LoadFontFromFile2(CFontsCache* pCache, const std::wstring& sPath, const int& lFaceIndex, const double& dSize, const double& dDpiX, const double& dDpiY);
|
||||
void CloseFont();
|
||||
|
||||
std::wstring GetFontType() const;
|
||||
unsigned int GetNameIndex(const std::wstring& wsName) const;
|
||||
|
||||
@ -214,6 +214,15 @@ public:
|
||||
_SetFont();
|
||||
}
|
||||
|
||||
public:
|
||||
void CloseFont()
|
||||
{
|
||||
if (NULL != m_pFontManager)
|
||||
m_pFontManager->CloseFont();
|
||||
m_oInstalledFont.SetDefaultParams();
|
||||
m_oInstalledFont.Name = L"";
|
||||
}
|
||||
|
||||
protected:
|
||||
void _SetFont();
|
||||
void ApplyTransform(const double& d1, const double& d2, const double& d3, const double& d4, const double& d5, const double& d6);
|
||||
|
||||
Reference in New Issue
Block a user