Commit 49905853 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Сделано округление размера шрифта в буквице до половины целого числа (баг 20270).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49968 954022d7-b5bf-4e40-9824-e11837661b57
parent a0690707
...@@ -10984,7 +10984,8 @@ Paragraph.prototype = ...@@ -10984,7 +10984,8 @@ Paragraph.prototype =
var NewEmHeight = (Count - 1) * LineH + LineTA; var NewEmHeight = (Count - 1) * LineH + LineTA;
var Koef = NewEmHeight / EmHeight; var Koef = NewEmHeight / EmHeight;
TextPr.FontSize *= Koef; var NewFontSize = TextPr.FontSize * Koef;
TextPr.FontSize = parseInt(NewFontSize * 2) / 2;
g_oTextMeasurer.SetTextPr(TextPr); g_oTextMeasurer.SetTextPr(TextPr);
g_oTextMeasurer.SetFontSlot(fontslot_ASCII, 1); g_oTextMeasurer.SetFontSlot(fontslot_ASCII, 1);
...@@ -11019,7 +11020,7 @@ Paragraph.prototype = ...@@ -11019,7 +11020,7 @@ Paragraph.prototype =
var Dy = Descent * (LineH * Count) / ( Ascent - Descent ) + TNewHeight - TNewAscent + LineTD; var Dy = Descent * (LineH * Count) / ( Ascent - Descent ) + TNewHeight - TNewAscent + LineTD;
var PTextPr = new ParaTextPr( { RFonts : { Ascii : { Name : TextPr.RFonts.Ascii.Name, Index : -1 } }, FontSize : FontSize * Koef, Position : Dy } ); var PTextPr = new ParaTextPr( { RFonts : { Ascii : { Name : TextPr.RFonts.Ascii.Name, Index : -1 } }, FontSize : TextPr.FontSize, Position : Dy } );
this.Select_All(); this.Select_All();
this.Add( PTextPr ); this.Add( PTextPr );
...@@ -11074,7 +11075,9 @@ Paragraph.prototype = ...@@ -11074,7 +11075,9 @@ Paragraph.prototype =
var Koef = (Height - LineTD) / THeight; var Koef = (Height - LineTD) / THeight;
TextPr.FontSize *= Koef; var NewFontSize = TextPr.FontSize * Koef;
TextPr.FontSize = parseInt(NewFontSize * 2) / 2;
g_oTextMeasurer.SetTextPr(TextPr); g_oTextMeasurer.SetTextPr(TextPr);
g_oTextMeasurer.SetFontSlot(fontslot_ASCII, 1); g_oTextMeasurer.SetFontSlot(fontslot_ASCII, 1);
......
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