gdi32/tests: Added tests for vertical fonts.

This commit is contained in:
Qian Hong 2012-09-12 21:48:45 +08:00 committed by Alexandre Julliard
parent 6c1e264e8e
commit 8f91b51674
1 changed files with 28 additions and 0 deletions

View File

@ -4058,6 +4058,8 @@ static void test_fullname2_helper(const char *Family)
int i; int i;
DWORD otm_size, ret, buf_size; DWORD otm_size, ret, buf_size;
OUTLINETEXTMETRICA *otm; OUTLINETEXTMETRICA *otm;
BOOL want_vertical, get_vertical;
want_vertical = ( Family[0] == '@' );
hdc = CreateCompatibleDC(0); hdc = CreateCompatibleDC(0);
ok(hdc != NULL, "CreateCompatibleDC failed\n"); ok(hdc != NULL, "CreateCompatibleDC failed\n");
@ -4084,6 +4086,13 @@ static void test_fullname2_helper(const char *Family)
trace("Checking font %s:\nFamilyName: %s; FaceName: %s; StyleName: %s\n", Family, FamilyName, FaceName, StyleName); trace("Checking font %s:\nFamilyName: %s; FaceName: %s; StyleName: %s\n", Family, FamilyName, FaceName, StyleName);
get_vertical = ( FamilyName[0] == '@' );
if (get_vertical)
{
todo_wine ok(get_vertical == want_vertical, "Vertical flags don't match: %s %s\n", Family, FamilyName);
continue;
}
lstrcpyA(lf.lfFaceName, FaceName); lstrcpyA(lf.lfFaceName, FaceName);
hfont = CreateFontIndirectA(&lf); hfont = CreateFontIndirectA(&lf);
ok(hfont != 0, "CreateFontIndirectA failed\n"); ok(hfont != 0, "CreateFontIndirectA failed\n");
@ -4170,9 +4179,28 @@ static void test_fullname2_helper(const char *Family)
static void test_fullname2(void) static void test_fullname2(void)
{ {
test_fullname2_helper("Arial");
test_fullname2_helper("DejaVu Sans");
test_fullname2_helper("Lucida Sans"); test_fullname2_helper("Lucida Sans");
test_fullname2_helper("Tahoma");
test_fullname2_helper("Webdings"); test_fullname2_helper("Webdings");
test_fullname2_helper("Wingdings"); test_fullname2_helper("Wingdings");
test_fullname2_helper("SimSun");
test_fullname2_helper("NSimSun");
test_fullname2_helper("MingLiu");
test_fullname2_helper("PMingLiu");
test_fullname2_helper("WenQuanYi Micro Hei");
test_fullname2_helper("MS UI Gothic");
test_fullname2_helper("Ume UI Gothic");
test_fullname2_helper("MS Gothic");
test_fullname2_helper("Ume Gothic");
test_fullname2_helper("MS PGothic");
test_fullname2_helper("Ume P Gothic");
test_fullname2_helper("Gulim");
test_fullname2_helper("Batang");
test_fullname2_helper("UnBatang");
test_fullname2_helper("UnDotum");
} }
static BOOL write_ttf_file(const char *fontname, char *tmp_name) static BOOL write_ttf_file(const char *fontname, char *tmp_name)