gdiplus: Set font emSize to height minus internal leading.

Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codewevers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Shawn M. Chapla 2020-07-14 21:24:57 -04:00 committed by Alexandre Julliard
parent bfc8404041
commit 04d536267e
2 changed files with 2 additions and 2 deletions

View File

@ -219,7 +219,7 @@ GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC hdc,
if (!*font) return OutOfMemory; if (!*font) return OutOfMemory;
(*font)->unit = UnitWorld; (*font)->unit = UnitWorld;
(*font)->emSize = otm.otmTextMetrics.tmAscent; (*font)->emSize = otm.otmTextMetrics.tmHeight - otm.otmTextMetrics.tmInternalLeading;
(*font)->otm = otm; (*font)->otm = otm;
stat = GdipCreateFontFamilyFromName(facename, NULL, &(*font)->family); stat = GdipCreateFontFamilyFromName(facename, NULL, &(*font)->family);

View File

@ -344,7 +344,7 @@ static void test_logfont(void)
stat = GdipGetFontSize(font, &rval); stat = GdipGetFontSize(font, &rval);
expect(Ok, stat); expect(Ok, stat);
todo_wine expectf(test_sizes[i].expected, rval); expectf(test_sizes[i].expected, rval);
GdipDeleteFont(font); GdipDeleteFont(font);
font = NULL; font = NULL;