Commit 82f7be35 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

fontRenderingMode на init-е

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47324 954022d7-b5bf-4e40-9824-e11837661b57
parent 8aa5f9d1
...@@ -2227,7 +2227,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -2227,7 +2227,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
if (mode !== this.fontRenderingMode) { if (mode !== this.fontRenderingMode) {
this.fontRenderingMode = mode; this.fontRenderingMode = mode;
if (this.wb) if (this.wb)
this.wb.setFontRenderingMode(mode); this.wb.setFontRenderingMode(mode, /*isInit*/false);
} }
}, },
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
this.wsActive = -1; this.wsActive = -1;
this.wsViews = []; this.wsViews = [];
this.cellEditor = undefined; this.cellEditor = undefined;
this.fontRenderingMode = fontRenderingMode; this.fontRenderingMode = c_oAscFontRenderingModeType.noHinting;
this._lockDraw = false; this._lockDraw = false;
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
this.fmgrGraphics[1].Initialize(true); // IE memory enable this.fmgrGraphics[1].Initialize(true); // IE memory enable
//----------------------- //-----------------------
this.init(); this.init(fontRenderingMode);
return this; return this;
} }
...@@ -93,9 +93,13 @@ ...@@ -93,9 +93,13 @@
}, },
init: function () { init: function (fontRenderingMode) {
var self = this; var self = this;
// Init font managers rendering
// Изначально мы инициализируем c_oAscFontRenderingModeType.noHinting
this.setFontRenderingMode(fontRenderingMode, /*isInit*/true);
// create canvas // create canvas
var outer = this.element.find("#ws-canvas-outer"); var outer = this.element.find("#ws-canvas-outer");
if (outer.length < 1) { if (outer.length < 1) {
...@@ -1314,8 +1318,9 @@ ...@@ -1314,8 +1318,9 @@
/* /*
* @param {c_oAscRenderingModeType} mode Режим отрисовки * @param {c_oAscRenderingModeType} mode Режим отрисовки
* @param {Boolean} isInit инициализация или нет
*/ */
setFontRenderingMode: function (mode) { setFontRenderingMode: function (mode, isInit) {
var ws; var ws;
if (mode !== this.fontRenderingMode) { if (mode !== this.fontRenderingMode) {
this.fontRenderingMode = mode; this.fontRenderingMode = mode;
...@@ -1326,10 +1331,11 @@ ...@@ -1326,10 +1331,11 @@
else if (c_oAscFontRenderingModeType.hintingAndSubpixeling === mode) else if (c_oAscFontRenderingModeType.hintingAndSubpixeling === mode)
this._setHintsProps(true, true); this._setHintsProps(true, true);
ws = this.getWorksheet(); if (!isInit) {
ws.draw(); ws = this.getWorksheet();
ws.draw();
this.cellEditor.setFontRenderingMode(mode); this.cellEditor.setFontRenderingMode(mode);
}
} }
}, },
......
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