Commit 1e2b5432 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Правка для измерения ширины.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64362 954022d7-b5bf-4e40-9824-e11837661b57
parent 4881f5aa
...@@ -893,7 +893,8 @@ ...@@ -893,7 +893,8 @@
r = getCvtRatio(0/*px*/, units >= 0 && units <=3 ? units : this.units, this.ppiX); r = getCvtRatio(0/*px*/, units >= 0 && units <=3 ? units : this.units, this.ppiX);
for (var tmp, w = 0, w2 = 0, i = 0; i < text.length; ++i) { for (var tmp, w = 0, w2 = 0, i = 0; i < text.length; ++i) {
tmp = fm.MeasureChar(text.charCodeAt(i)); tmp = fm.MeasureChar(text.charCodeAt(i));
w += asc_round(tmp.fAdvanceX); //w += asc_round(tmp.fAdvanceX); скачет при wrap в ячейке и zoom
w += tmp.fAdvanceX;
} }
w2 = w - tmp.fAdvanceX + tmp.oBBox.fMaxX - tmp.oBBox.fMinX + 1; w2 = w - tmp.fAdvanceX + tmp.oBBox.fMaxX - tmp.oBBox.fMinX + 1;
return this._calcTextMetrics(w * r, w2 * r, fm, r); return this._calcTextMetrics(w * r, w2 * r, fm, r);
......
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