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

подбор шрифтов на клиенте эксель

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@60941 954022d7-b5bf-4e40-9824-e11837661b57
parent a1557615
......@@ -398,18 +398,24 @@
{
for (var i in _fonts)
{
var info_ind = this.map_font_index[_fonts[i]];
if (info_ind != undefined)
{
this.fonts_loading[this.fonts_loading.length] = this.fontInfos[info_ind];
}
var fontinfo = g_fontApplication.GetFontInfo(_fonts[i]);
this.fonts_loading[this.fonts_loading.length] = fontinfo;
}
this.Api.asyncFontsDocumentStartLoaded();
this._LoadFonts();
};
this.AddLoadFonts = function(info, need_styles)
this.AddLoadFonts = function(name, need_styles)
{
var fontinfo = g_fontApplication.GetFontInfo(name);
this.fonts_loading[this.fonts_loading.length] = fontinfo;
this.fonts_loading[this.fonts_loading.length - 1].NeedStyles = (need_styles == undefined) ? 0x0F : need_styles;
return fontinfo;
};
this.AddLoadFontsNotPick = function(info, need_styles)
{
this.fonts_loading[this.fonts_loading.length] = info;
this.fonts_loading[this.fonts_loading.length - 1].NeedStyles = (need_styles == undefined) ? 0x0F : need_styles;
......@@ -438,10 +444,8 @@
{
if (_fonts[i].Type != FONT_TYPE_EMBEDDED)
{
var info = this.fontInfos[this.map_font_index[_fonts[i].name]];
var info = this.AddLoadFonts(_fonts[i].name, _fonts[i].NeedStyles);
this.AddLoadFonts(info, _fonts[i].NeedStyles);
if (info.Type == FONT_TYPE_ADDITIONAL)
{
if (info.name != "ASCW3")
......@@ -458,7 +462,7 @@
{
if (this.embeddedFontInfos[j].Name == _fonts[i].name)
{
this.AddLoadFonts(this.embeddedFontInfos[j], 0);
this.AddLoadFontsNotPick(this.embeddedFontInfos[j], 0);
break;
}
}
......@@ -471,14 +475,11 @@
if (this.Api.IsNeedDefaultFonts())
{
// теперь добавим шрифты, без которых редактор как без рук (спецсимволы + дефолтовые стили документа)
this.AddLoadFonts(this.fontInfos[this.map_font_index["Arial"]], 0x0F);
this.AddLoadFonts(this.fontInfos[this.map_font_index["Symbol"]], 0x0F);
this.AddLoadFonts(this.fontInfos[this.map_font_index["Wingdings"]], 0x0F);
this.AddLoadFonts(this.fontInfos[this.map_font_index["Courier New"]], 0x0F);
//if (is_default === true)
{
this.AddLoadFonts(this.fontInfos[this.map_font_index["Times New Roman"]], 0x0F);
}
this.AddLoadFonts("Arial", 0x0F);
this.AddLoadFonts("Symbol", 0x0F);
this.AddLoadFonts("Wingdings", 0x0F);
this.AddLoadFonts("Courier New", 0x0F);
this.AddLoadFonts("Times New Roman", 0x0F);
}
this.Api.asyncFontsDocumentStartLoaded();
......@@ -492,8 +493,7 @@
// сначала заполняем массив this.fonts_loading объекстами fontinfo
for (var i in _fonts)
{
var info = this.fontInfos[this.map_font_index[_fonts[i].name]];
this.AddLoadFonts(info, 0x0F);
this.AddLoadFonts(_fonts[i].name, 0x0F);
}
if (null == this.ThemeLoader)
......
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