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:
parent
bfc8404041
commit
04d536267e
|
@ -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);
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue