From 0d324b1fab33d04d26f2a0329821e9e32b0bae79 Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Tue, 24 May 2011 09:43:06 -0500 Subject: [PATCH] usp10: Add Arabic shaping test. --- dlls/usp10/tests/usp10.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index faa457c99cb..ccc2630c554 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -551,6 +551,14 @@ static void test_ScriptShapeOpenType(HDC hdc) {1,{{SCRIPT_JUSTIFY_CHARACTER,1,0,0,0,0},0}}, {1,{{SCRIPT_JUSTIFY_CHARACTER,1,0,0,0,0},0}} }; + /* Arabic */ + static const WCHAR test_arabic[] = {0x0633,0x0644,0x0627,0x0645,0}; + static const shapeTest_char arabic_c[] = {{2,{0,0}},{1,{0,0}},{1,{0,0}},{0,{0,0}}}; + static const shapeTest_glyph arabic_g[] = { + {1,{{SCRIPT_JUSTIFY_NONE,1,0,0,0,0},0}}, + {1,{{SCRIPT_JUSTIFY_ARABIC_NORMAL,1,0,0,0,0},0}}, + {1,{{SCRIPT_JUSTIFY_ARABIC_SEEN,1,0,0,0,0},0}} }; + if (!pScriptItemizeOpenType || !pScriptShapeOpenType) { win_skip("ScriptShapeOpenType not available on this platform\n"); @@ -583,6 +591,7 @@ static void test_ScriptShapeOpenType(HDC hdc) test_shape_ok(hdc, test1, 4, &Control, &State, 0, 4, t1_c, t1_g); test_shape_ok(hdc, test2, 4, &Control, &State, 1, 4, t2_c, t2_g); + test_valid = find_font_for_range(hdc, "Microsoft Sans Serif", 11, test_hebrew[0], &hfont, &hfont_orig); if (hfont != NULL) { @@ -590,6 +599,14 @@ static void test_ScriptShapeOpenType(HDC hdc) SelectObject(hdc, hfont_orig); DeleteObject(hfont); } + + test_valid = find_font_for_range(hdc, "Microsoft Sans Serif", 13, test_arabic[0], &hfont, &hfont_orig); + if (hfont != NULL) + { + test_shape_ok_valid(test_valid, hdc, test_arabic, 4, &Control, &State, 0, 3, arabic_c, arabic_g); + SelectObject(hdc, hfont_orig); + DeleteObject(hfont); + } } static void test_ScriptShape(HDC hdc) -- 2.11.4.GIT