Commit 47e70af5 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

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.
parent 56a3e788
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment