Commit 1c77f737 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@47383 954022d7-b5bf-4e40-9824-e11837661b57
parent fe4cb45b
......@@ -551,7 +551,7 @@ function CFontInfo(sName, thumbnail, type, indexR, faceIndexR, indexI, faceIndex
return isNeed;
}
this.LoadFont = function(font_loader, fontManager, fEmSize, lStyle, dHorDpi, dVerDpi,transform)
this.LoadFont = function(font_loader, fontManager, fEmSize, lStyle, dHorDpi, dVerDpi, transform)
{
// сначала нужно проверить на обрезанный шрифт
var _embedded_cur = g_font_loader.embedded_cut_manager;
......
......@@ -1045,9 +1045,9 @@ CGraphics.prototype =
{
return this.m_oCurFont;
},
font : function(font_id,font_size)
font : function(font_id,font_size,matrix)
{
g_font_infos[g_map_font_index[font_id]].LoadFont(editor.FontLoader, this.m_oFontManager, font_size, 0, this.m_dDpiX, this.m_dDpiY);
g_font_infos[g_map_font_index[font_id]].LoadFont(editor.FontLoader, this.m_oFontManager, font_size, 0, this.m_dDpiX, this.m_dDpiY, /*matrix*/undefined);
},
SetFont : function(font)
{
......
......@@ -337,6 +337,7 @@ function CDocMeta()
this.Drawings = new Array();
this.Selection = new CDocMetaSelection();
this.TextMatrix = new CMatrix();
this.SearchInfo =
{
......@@ -458,7 +459,14 @@ function CDocMeta()
if (obj.fontId != -1)
{
// все для того, чтобы не лочить отрисовку страниц. с этим ифом - отрисовка полностью параллельна
g.font("font" + obj.fontId, obj.fontSize);
var _matr = this.TextMatrix;
_matr.sx = obj.tm_sx;
_matr.shy = obj.tm_shy;
_matr.shx = obj.tm_shx;
_matr.sy = obj.tm_sy;
_matr.tx = 0;
_matr.ty = 0;
g.font("font" + obj.fontId, obj.fontSize, _matr);
g.m_oFontManager.SetTextMatrix(obj.tm_sx, obj.tm_shy, obj.tm_shx, obj.tm_sy, 0, 0);
}
......@@ -477,9 +485,16 @@ function CDocMeta()
var style = s.GetLong();
var size = s.GetDouble();
g.font(font, size);
var _matr = this.TextMatrix;
var m = g.m_oTransform;
_matr.sx = m.sx;
_matr.shy = m.shy;
_matr.shx = m.shx;
_matr.sy = m.sy;
_matr.tx = 0;
_matr.ty = 0;
g.font(font, size, _matr);
g.m_oFontManager.SetTextMatrix(m.sx, m.shy, m.shx, m.sy, 0, 0);
obj.fontId = fontId;
......
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