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:
parent
56a3e788ea
commit
47e70af50b
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue