From a1cd8244dcf67ab1a3dd9571907a64254d08bbf3 Mon Sep 17 00:00:00 2001 From: juha Date: Fri, 10 Apr 2020 11:58:53 +0000 Subject: [PATCH] LazReport: Fix incorrect text height better. Issue #36893, patch from Michal Gawrycki. git-svn-id: trunk@62924 - --- components/lazreport/source/lr_class.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/lazreport/source/lr_class.pas b/components/lazreport/source/lr_class.pas index 6dc4539b99..e55feaf7b3 100644 --- a/components/lazreport/source/lr_class.pas +++ b/components/lazreport/source/lr_class.pas @@ -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]);