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 ...@@ -1840,27 +1840,16 @@ namespace NSHtmlRenderer
CFile oFileFontFileJS; CFile oFileFontFileJS;
oFileFontFileJS.CreateFile(sFilePathDst); oFileFontFileJS.CreateFile(sFilePathDst);
LONG lFontIndex = lIndex; CString strWriteJS = _T("window[\"") + strFileD + _T("\"] = \"");
CStringA t1 = (CStringA)strWriteJS;
CString strNum = _T(""); oFileFontFileJS.WriteFile((void*)t1.GetBuffer(), (DWORD)t1.GetLength());
strNum.Format(_T("%d"), lFontIndex); t1 = "";
strNum = _T("__font_data") + strNum; t1.Format("%d;", nInputLen);
oFileFontFileJS.WriteFile((void*)t1.GetBuffer(), (DWORD)t1.GetLength());
CStringA strA;
CString t1 = _T("var ") + strNum + _T("=\"");
strA = (CStringA)t1;
oFileFontFileJS.WriteFile((void*)strA.GetBuffer(), (DWORD)strA.GetLength());
oFileFontFileJS.WriteFile((void*)pOutput, (DWORD)(nOutputLen)); oFileFontFileJS.WriteFile((void*)pOutput, (DWORD)(nOutputLen));
t1 = "\";";
CString strRes = _T(""); oFileFontFileJS.WriteFile((void*)t1.GetBuffer(), (DWORD)t1.GetLength());
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());
oFileFontFileJS.CloseFile(); oFileFontFileJS.CloseFile();
RELEASEARRAYOBJECTS(pOutput); RELEASEARRAYOBJECTS(pOutput);
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
//1 //1
//0 //0
//0 //0
//74 //75
#define INTVER 1,0,0,74 #define INTVER 1,0,0,75
#define STRVER "1,0,0,74\0" #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