From 47e70af50b252153bc76a1bf71e02a56dfea762e Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Fri, 1 May 2009 11:09:23 -0500 Subject: [PATCH] gdiplus: Correct the lfHeight calculation in GdipCreateFontFromLogfontW. Negative lfHeight values do not include internal leading. This was making fonts created from LOGFONT structures larger than they should be. --- dlls/gdiplus/font.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 68540e40ad7..0b582a73c47 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -195,7 +195,7 @@ GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC hdc, oldfont = SelectObject(hdc, hfont); GetTextMetricsW(hdc, &textmet); - (*font)->lfw.lfHeight = -textmet.tmHeight; + (*font)->lfw.lfHeight = -(textmet.tmHeight-textmet.tmInternalLeading); (*font)->lfw.lfWeight = textmet.tmWeight; (*font)->lfw.lfCharSet = textmet.tmCharSet;