LazReport: Fix incorrect text height better. Issue #36893, patch from Michal Gawrycki.

git-svn-id: trunk@62924 -
This commit is contained in:
juha 2020-04-10 11:58:53 +00:00
parent 1bc57e8667
commit a1cd8244dc

View File

@ -3748,7 +3748,7 @@ begin
fs := Round((-GetFontData(Self.Font.Handle).Height * 72 / Self.Font.PixelsPerInch))
else
fs := Self.Font.Size;
ACanvas.Font.Height := -Round(fs * Self.Font.PixelsPerInch / 72 * ScaleY);
ACanvas.Font.Height := -Round(fs * 96 / 72 * ScaleY);
end;
{$IFDEF DebugLR}
DebugLnExit('AssignFont (%s) DONE: Self.Font.Size=%d aCanvas.Font.Size=%d',
@ -4026,7 +4026,7 @@ begin
size := Round((-GetFontData(WCanvas.Font.Handle).Height * 72 / WCanvas.Font.PixelsPerInch))
else
size := WCanvas.Font.Size;
WCanvas.Font.Height := -Round(size * WCanvas.Font.PixelsPerInch / 72);
WCanvas.Font.Height := -Round(size * 96 / 72);
{$IFDEF DebugLR}
DebugLnEnter('TfrMemoView.WrapMemo INI Font.PPI=%d Font.Size=%d Canvas.Font.PPI=%d WCanvas.Font.Size=%d',
[Font.PixelsPerInch, Font.Size,Canvas.Font.PixelsPerInch,WCanvas.Font.Size]);