From bd07f675719c41c595a2255707cc0199d9b7cae3 Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Thu, 2 Jun 2011 14:57:20 -0500 Subject: [PATCH] usp10/tests: Add Bengali shaping test. --- dlls/usp10/tests/usp10.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index 835a9385de1..e0e6e3e8352 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -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)