user32/tests: Use symbol charset when creating Marlett font.

This commit is contained in:
Dmitry Timoshkov 2009-08-05 11:03:39 +09:00 committed by Alexandre Julliard
parent 2858f67a2a
commit 5b90101e2e
1 changed files with 18 additions and 14 deletions

View File

@ -94,28 +94,29 @@ static void test_setitemheight(DWORD style)
static void test_setfont(DWORD style)
{
HWND hCombo = build_combo(style);
HFONT hFont1 = CreateFont(10, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH|FF_DONTCARE, "Marlett");
HFONT hFont2 = CreateFont(8, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH|FF_DONTCARE, "Marlett");
HWND hCombo;
HFONT hFont1, hFont2;
RECT r;
int i;
if (!is_font_installed("Marlett"))
{
skip("Marlett font not available\n");
return;
}
trace("Style %x\n", style);
hCombo = build_combo(style);
hFont1 = CreateFont(10, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, SYMBOL_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH|FF_DONTCARE, "Marlett");
hFont2 = CreateFont(8, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, SYMBOL_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH|FF_DONTCARE, "Marlett");
GetClientRect(hCombo, &r);
expect_rect(r, 0, 0, 100, 24);
SendMessageA(hCombo, CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)&r);
MapWindowPoints(HWND_DESKTOP, hMainWnd, (LPPOINT)&r, 2);
todo_wine expect_rect(r, 5, 5, 105, 105);
if (!is_font_installed("Marlett"))
{
skip("Marlett font not available\n");
DestroyWindow(hCombo);
DeleteObject(hFont1);
DeleteObject(hFont2);
return;
}
if (font_height(hFont1) == 10 && font_height(hFont2) == 8)
{
SendMessage(hCombo, WM_SETFONT, (WPARAM)hFont1, FALSE);
@ -140,11 +141,14 @@ static void test_setfont(DWORD style)
todo_wine expect_rect(r, 5, 5, 105, 99);
}
else
skip("Invalid Marlett font heights\n");
{
ok(0, "Expected Marlett font heights 10/8, got %d/%d\n",
font_height(hFont1), font_height(hFont2));
}
for (i = 1; i < 30; i++)
{
HFONT hFont = CreateFont(i, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH|FF_DONTCARE, "Marlett");
HFONT hFont = CreateFont(i, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, SYMBOL_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH|FF_DONTCARE, "Marlett");
int height = font_height(hFont);
SendMessage(hCombo, WM_SETFONT, (WPARAM)hFont, FALSE);