Aric Stewart : usp10/tests: Add Devanagari shaping test.

Alexandre Julliard julliard at winehq.org
Fri Jun 3 14:04:40 CDT 2011


Module: wine
Branch: master
Commit: adfd870ba659b09593c5679839b60f20485b4e52
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=adfd870ba659b09593c5679839b60f20485b4e52

Author: Aric Stewart <aric at codeweavers.com>
Date:   Thu Jun  2 14:57:14 2011 -0500

usp10/tests: Add Devanagari shaping test.

---

 dlls/usp10/tests/usp10.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
index 53f572e..835a938 100644
--- a/dlls/usp10/tests/usp10.c
+++ b/dlls/usp10/tests/usp10.c
@@ -748,6 +748,19 @@ static void test_ScriptShapeOpenType(HDC hdc)
                             {1,{{SCRIPT_JUSTIFY_NONE,0,0,0,0,0},0}},
                             {1,{{SCRIPT_JUSTIFY_NONE,1,0,0,0,0},0}} };
 
+    /* Devanagari */
+    static const WCHAR test_devanagari[] = {0x0926, 0x0947, 0x0935, 0x0928, 0x093e, 0x0917, 0x0930, 0x0940};
+    static const shapeTest_char devanagari_c[] = {{0,{0,0}},{0,{0,0}},{2,{0,0}},{3,{0,0}},{3,{0,0}},{5,{0,0}},{6,{0,0}},{6,{0,0}}};
+    static const shapeTest_glyph devanagari_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,1,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}},
+                            {1,{{SCRIPT_JUSTIFY_NONE,1,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");
@@ -844,6 +857,14 @@ static void test_ScriptShapeOpenType(HDC hdc)
         SelectObject(hdc, hfont_orig);
         DeleteObject(hfont);
     }
+
+    test_valid = find_font_for_range(hdc, "Mangal", 15, test_devanagari[0], &hfont, &hfont_orig);
+    if (hfont != NULL)
+    {
+        test_shape_ok_valid(test_valid, hdc, test_devanagari, 8, &Control, &State, 0, 8, devanagari_c, devanagari_g);
+        SelectObject(hdc, hfont_orig);
+        DeleteObject(hfont);
+    }
 }
 
 static void test_ScriptShape(HDC hdc)




More information about the wine-cvs mailing list