Vincent Povirk : gdiplus: Correct the lfHeight calculation in GdipCreateFontFromLogfontW.
Alexandre Julliard
julliard at winehq.org
Mon May 4 09:06:37 CDT 2009
Module: wine
Branch: master
Commit: 47e70af50b252153bc76a1bf71e02a56dfea762e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=47e70af50b252153bc76a1bf71e02a56dfea762e
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Fri May 1 11:09:23 2009 -0500
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 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index 68540e4..0b582a7 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;
More information about the wine-cvs
mailing list