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.
This commit is contained in:
Vincent Povirk 2009-05-01 11:09:23 -05:00 committed by Alexandre Julliard
parent 56a3e788ea
commit 47e70af50b
1 changed files with 1 additions and 1 deletions

View File

@ -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;