Commit af2e7eb2 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

Test to show that the height returned by GetTextExtentPoint is the

same as tmHeight.
parent 98ac2c1d
......@@ -301,10 +301,35 @@ static void test_GdiGetCharDimensions(void)
DeleteDC(hdc);
}
static void test_text_extents(void)
{
LOGFONTA lf;
TEXTMETRICA tm;
HDC hdc;
HFONT hfont;
SIZE sz;
memset(&lf, 0, sizeof(lf));
strcpy(lf.lfFaceName, "Arial");
lf.lfHeight = 20;
hfont = CreateFontIndirectA(&lf);
hdc = GetDC(0);
hfont = SelectObject(hdc, hfont);
GetTextMetricsA(hdc, &tm);
GetTextExtentPointA(hdc, "o", 1, &sz);
ok(sz.cy == tm.tmHeight, "cy %ld tmHeight %ld\n", sz.cy, tm.tmHeight);
SelectObject(hdc, hfont);
DeleteObject(hfont);
ReleaseDC(NULL, hdc);
}
START_TEST(gdiobj)
{
test_logfont();
test_bitmap_font();
test_gdi_objects();
test_GdiGetCharDimensions();
test_text_extents();
}
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