Commit b6455550 authored by Oleg.Korshul's avatar Oleg.Korshul

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

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@60942 954022d7-b5bf-4e40-9824-e11837661b57
parent a411572b
......@@ -162,12 +162,6 @@ function CTextMeasurer()
this.m_oFont = font;
if (-1 == font.FontFamily.Index || undefined === font.FontFamily.Index || null == font.FontFamily.Index)
font.FontFamily.Index = window.g_map_font_index[font.FontFamily.Name];
if (font.FontFamily.Index == undefined || font.FontFamily.Index == -1)
return;
var bItalic = true === font.Italic;
var bBold = true === font.Bold;
......@@ -180,13 +174,13 @@ function CTextMeasurer()
oFontStyle = FontStyle.FontStyleBoldItalic;
var _lastSetUp = this.m_oLastFont;
if (_lastSetUp.SetUpIndex != font.FontFamily.Index || _lastSetUp.SetUpSize != font.FontSize || _lastSetUp.SetUpStyle != oFontStyle)
if (_lastSetUp.SetUpName != font.FontFamily.Name || _lastSetUp.SetUpSize != font.FontSize || _lastSetUp.SetUpStyle != oFontStyle)
{
_lastSetUp.SetUpIndex = font.FontFamily.Index;
_lastSetUp.SetUpName = font.FontFamily.Name;
_lastSetUp.SetUpSize = font.FontSize;
_lastSetUp.SetUpStyle = oFontStyle;
window.g_font_infos[_lastSetUp.SetUpIndex].LoadFont(window.g_font_loader, this.m_oManager, _lastSetUp.SetUpSize, _lastSetUp.SetUpStyle, 72, 72);
g_fontApplication.LoadFont(_lastSetUp.SetUpName, window.g_font_loader, this.m_oManager, _lastSetUp.SetUpSize, _lastSetUp.SetUpStyle, 72, 72);
}
}
......@@ -213,11 +207,6 @@ function CTextMeasurer()
_lastFont.Name = _rfonts.Ascii.Name;
_lastFont.Index = _rfonts.Ascii.Index;
if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{
_lastFont.Index = window.g_map_font_index[_lastFont.Name];
}
_lastFont.Size = this.m_oTextPr.FontSize;
_lastFont.Bold = this.m_oTextPr.Bold;
_lastFont.Italic = this.m_oTextPr.Italic;
......@@ -229,11 +218,6 @@ function CTextMeasurer()
_lastFont.Name = _rfonts.CS.Name;
_lastFont.Index = _rfonts.CS.Index;
if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{
_lastFont.Index = window.g_map_font_index[_lastFont.Name];
}
_lastFont.Size = this.m_oTextPr.FontSizeCS;
_lastFont.Bold = this.m_oTextPr.BoldCS;
_lastFont.Italic = this.m_oTextPr.ItalicCS;
......@@ -245,11 +229,6 @@ function CTextMeasurer()
_lastFont.Name = _rfonts.EastAsia.Name;
_lastFont.Index = _rfonts.EastAsia.Index;
if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{
_lastFont.Index = window.g_map_font_index[_lastFont.Name];
}
_lastFont.Size = this.m_oTextPr.FontSize;
_lastFont.Bold = this.m_oTextPr.Bold;
_lastFont.Italic = this.m_oTextPr.Italic;
......@@ -262,11 +241,6 @@ function CTextMeasurer()
_lastFont.Name = _rfonts.HAnsi.Name;
_lastFont.Index = _rfonts.HAnsi.Index;
if (_lastFont.Index == -1 || _lastFont.Index === undefined)
{
_lastFont.Index = window.g_map_font_index[_lastFont.Name];
}
_lastFont.Size = this.m_oTextPr.FontSize;
_lastFont.Bold = this.m_oTextPr.Bold;
_lastFont.Italic = this.m_oTextPr.Italic;
......@@ -284,13 +258,13 @@ function CTextMeasurer()
if (_lastFont.Bold)
_style += 1;
if (_lastFont.Index != _lastFont.SetUpIndex || _lastFont.Size != _lastFont.SetUpSize || _style != _lastFont.SetUpStyle)
if (_lastFont.Name != _lastFont.SetUpName || _lastFont.Size != _lastFont.SetUpSize || _style != _lastFont.SetUpStyle)
{
_lastFont.SetUpIndex = _lastFont.Index;
_lastFont.SetUpName = _lastFont.Name;
_lastFont.SetUpSize = _lastFont.Size;
_lastFont.SetUpStyle = _style;
window.g_font_infos[_lastFont.SetUpIndex].LoadFont(window.g_font_loader, this.m_oManager, _lastFont.SetUpSize, _lastFont.SetUpStyle, 72, 72);
g_fontApplication.LoadFont(_lastFont.SetUpName, window.g_font_loader, this.m_oManager, _lastFont.SetUpSize, _lastFont.SetUpStyle, 72, 72);
}
}
......
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