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

(1.0.0.75) новый формат шрифтов

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@53048 954022d7-b5bf-4e40-9824-e11837661b57
parent 790f6d4e
......@@ -1840,27 +1840,16 @@ namespace NSHtmlRenderer
CFile oFileFontFileJS;
oFileFontFileJS.CreateFile(sFilePathDst);
LONG lFontIndex = lIndex;
CString strNum = _T("");
strNum.Format(_T("%d"), lFontIndex);
strNum = _T("__font_data") + strNum;
CStringA strA;
CString t1 = _T("var ") + strNum + _T("=\"");
strA = (CStringA)t1;
oFileFontFileJS.WriteFile((void*)strA.GetBuffer(), (DWORD)strA.GetLength());
CString strWriteJS = _T("window[\"") + strFileD + _T("\"] = \"");
CStringA t1 = (CStringA)strWriteJS;
oFileFontFileJS.WriteFile((void*)t1.GetBuffer(), (DWORD)t1.GetLength());
t1 = "";
t1.Format("%d;", nInputLen);
oFileFontFileJS.WriteFile((void*)t1.GetBuffer(), (DWORD)t1.GetLength());
oFileFontFileJS.WriteFile((void*)pOutput, (DWORD)(nOutputLen));
CString strRes = _T("");
strRes.Format(_T("\";\nvar __font_data%d_idx = g_fonts_streams.length;\n\
g_fonts_streams[__font_data%d_idx] = CreateFontData2(__font_data%d,%d);\n\
__font_data%d = null;\n\
window.g_font_loader.SetStreamIndexEmb(%d, __font_data%d_idx);"), lFontIndex, lFontIndex, lFontIndex, nInputLen, lFontIndex, lFontIndex, lFontIndex);
strA = (CStringA)strRes;
oFileFontFileJS.WriteFile((void*)strA.GetBuffer(), (DWORD)strA.GetLength());
t1 = "\";";
oFileFontFileJS.WriteFile((void*)t1.GetBuffer(), (DWORD)t1.GetLength());
oFileFontFileJS.CloseFile();
RELEASEARRAYOBJECTS(pOutput);
......
......@@ -2,6 +2,6 @@
//1
//0
//0
//74
#define INTVER 1,0,0,74
#define STRVER "1,0,0,74\0"
//75
#define INTVER 1,0,0,75
#define STRVER "1,0,0,75\0"
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