Commit 3c1545b1 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@52352 954022d7-b5bf-4e40-9824-e11837661b57
parent 78b9f72d
...@@ -2698,6 +2698,28 @@ public: ...@@ -2698,6 +2698,28 @@ public:
} }
} }
CString GetFontPath(CString strName, CWinFontList* pList)
{
CString strFontName = strName;
strFontName.Replace(L"&", L"&");
strFontName.Replace(L"'", L"'");
strFontName.Replace(L"<", L"&lt;");
strFontName.Replace(L">", L"&gt;");
strFontName.Replace(L"\"", L"&quot;");
CString sXml = _T("<FontProperties><Name value='");
sXml += strFontName;
sXml += _T("'/>");
sXml += _T("</FontProperties>");
CWinFontInfo *pFontInfo = pList->GetByParams(sXml);
if (pFontInfo)
return pFontInfo->m_wsFontPath;
return _T("");
}
private: private:
double UpdateSize(double dOldSize, double dDpi, double dNewDpi) double UpdateSize(double dOldSize, double dDpi, double dNewDpi)
......
...@@ -528,8 +528,12 @@ private: ...@@ -528,8 +528,12 @@ private:
if (bIsSymbol) if (bIsSymbol)
{ {
oFontManager.LoadFontFromFile(_T("C:\\Windows\\Fonts\\cour.ttf"), 14, 96, 96, lFaceIndex); CString strGetCour = oFontManager.GetFontPath(_T("Courier New"), m_pList);
pFont = oFontManager.GetFont(); if (_T("") != strGetCour)
{
oFontManager.LoadFontFromFile(strGetCour, 14, 96, 96, lFaceIndex);
pFont = oFontManager.GetFont();
}
} }
if (pFont) if (pFont)
......
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