1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

comctl32/tests: Modify test_width to try different fonts.

This commit is contained in:
Brendan McGrath 2023-11-24 10:53:51 +11:00 committed by Alexandre Julliard
parent 8934a53e61
commit 6a4fb894fe

View file

@ -676,16 +676,39 @@ static void test_tab(INT nMinTabWidth)
static void test_width(void)
{
trace ("Testing with default MinWidth\n");
test_tab(-1);
trace ("Testing with MinWidth set to -3\n");
test_tab(-3);
trace ("Testing with MinWidth set to 24\n");
test_tab(24);
trace ("Testing with MinWidth set to 54\n");
test_tab(54);
trace ("Testing with MinWidth set to 94\n");
test_tab(94);
HFONT oldFont = hFont;
const char *fonts[] = {
"System",
"Arial",
"Tahoma",
"Courier New",
"MS Shell Dlg",
};
LOGFONTA logfont = {
.lfHeight = -12,
.lfWeight = FW_NORMAL,
.lfCharSet = ANSI_CHARSET
};
for(int i = 0; i < sizeof(fonts)/sizeof(fonts[0]); i++) {
trace ("Testing with the '%s' font\n", fonts[i]);
lstrcpyA(logfont.lfFaceName, fonts[i]);
hFont = CreateFontIndirectA(&logfont);
trace ("Testing with default MinWidth\n");
test_tab(-1);
trace ("Testing with MinWidth set to -3\n");
test_tab(-3);
trace ("Testing with MinWidth set to 24\n");
test_tab(24);
trace ("Testing with MinWidth set to 54\n");
test_tab(54);
trace ("Testing with MinWidth set to 94\n");
test_tab(94);
}
hFont = oldFont;
}
static void test_setitemsize(void)