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

поддержка пустого AllFonts

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@67901 954022d7-b5bf-4e40-9824-e11837661b57
parent 2e7aff51
......@@ -1375,26 +1375,29 @@ CFontSelectList.prototype =
this.IsInit = true;
// read from stream
var _ft_stream = CreateFontData2(window["g_fonts_selection_bin"]);
var _file_stream = new FileStream(_ft_stream.data, _ft_stream.size);
var count = _file_stream.GetLong();
for (var i = 0; i < count; i++)
{
var _fs = new CFontSelect();
_fs.fromStream(_file_stream);
// корректируем плохие популярные шрифты
if (_fs.m_wsFontName == "Droid Sans Fallback")
{
if ((_fs.m_ulCodePageRange1 & (1 << 19)) == (1 << 19))
_fs.m_ulCodePageRange1 -= (1 << 19);
if (window["g_fonts_selection_bin"] != "")
{
// read from stream
var _ft_stream = CreateFontData2(window["g_fonts_selection_bin"]);
var _file_stream = new FileStream(_ft_stream.data, _ft_stream.size);
var count = _file_stream.GetLong();
for (var i = 0; i < count; i++)
{
var _fs = new CFontSelect();
_fs.fromStream(_file_stream);
// корректируем плохие популярные шрифты
if (_fs.m_wsFontName == "Droid Sans Fallback")
{
if ((_fs.m_ulCodePageRange1 & (1 << 19)) == (1 << 19))
_fs.m_ulCodePageRange1 -= (1 << 19);
}
this.List.push(_fs);
this.ListMap[_fs.m_wsFontPath] = this.List.length - 1;
}
this.List.push(_fs);
this.ListMap[_fs.m_wsFontPath] = this.List.length - 1;
}
}
// add languages
// 1) arabic
......
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