usp10/tests: Add Bengali shaping test.

This commit is contained in:
Aric Stewart 2011-06-02 14:57:20 -05:00 committed by Alexandre Julliard
parent adfd870ba6
commit bd07f67571
1 changed files with 18 additions and 0 deletions

View File

@ -761,6 +761,16 @@ static void test_ScriptShapeOpenType(HDC hdc)
{1,{{SCRIPT_JUSTIFY_NONE,1,0,0,0,0},0}},
{1,{{SCRIPT_JUSTIFY_NONE,0,0,0,0,0},0}} };
/* Bengali */
static const WCHAR test_bengali[] = {0x09ac, 0x09be, 0x0982, 0x09b2, 0x09be};
static const shapeTest_char bengali_c[] = {{0,{0,0}},{0,{0,0}},{0,{0,0}},{3,{0,0}},{3,{0,0}}};
static const shapeTest_glyph bengali_g[] = {
{1,{{SCRIPT_JUSTIFY_NONE,1,0,0,0,0},0}},
{1,{{SCRIPT_JUSTIFY_NONE,0,0,0,0,0},0}},
{1,{{SCRIPT_JUSTIFY_NONE,0,0,0,0,0},0}},
{1,{{SCRIPT_JUSTIFY_NONE,1,0,0,0,0},0}},
{1,{{SCRIPT_JUSTIFY_NONE,0,0,0,0,0},0}} };
if (!pScriptItemizeOpenType || !pScriptShapeOpenType)
{
win_skip("ScriptShapeOpenType not available on this platform\n");
@ -865,6 +875,14 @@ static void test_ScriptShapeOpenType(HDC hdc)
SelectObject(hdc, hfont_orig);
DeleteObject(hfont);
}
test_valid = find_font_for_range(hdc, "Vrinda", 16, test_bengali[0], &hfont, &hfont_orig);
if (hfont != NULL)
{
test_shape_ok_valid(test_valid, hdc, test_bengali, 5, &Control, &State, 0, 5, bengali_c, bengali_g);
SelectObject(hdc, hfont_orig);
DeleteObject(hfont);
}
}
static void test_ScriptShape(HDC hdc)