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

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


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

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

usp10/tests: Add Gujarati shaping test.

---

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

diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
index 5a8a1b4..7d12ce9 100644
--- a/dlls/usp10/tests/usp10.c
+++ b/dlls/usp10/tests/usp10.c
@@ -783,6 +783,18 @@ 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}} };
 
+    /* Gujarati */
+    static const WCHAR test_gujarati[] = {0x0a97, 0x0ac1, 0x0a9c, 0x0ab0, 0x0abe, 0x0aa4, 0x0ac0};
+    static const shapeTest_char gujarati_c[] = {{0,{0,0}},{0,{0,0}},{2,{0,0}},{3,{0,0}},{3,{0,0}},{5,{0,0}},{5,{0,0}}};
+    static const shapeTest_glyph gujarati_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,0,0,0,0,0},0}} };
+
     if (!pScriptItemizeOpenType || !pScriptShapeOpenType)
     {
         win_skip("ScriptShapeOpenType not available on this platform\n");
@@ -903,6 +915,14 @@ static void test_ScriptShapeOpenType(HDC hdc)
         SelectObject(hdc, hfont_orig);
         DeleteObject(hfont);
     }
+
+    test_valid = find_font_for_range(hdc, "Shruti", 18, test_gujarati[0], &hfont, &hfont_orig);
+    if (hfont != NULL)
+    {
+        test_shape_ok_valid(test_valid, hdc, test_gujarati, 7, &Control, &State, 0, 7, gujarati_c, gujarati_g);
+        SelectObject(hdc, hfont_orig);
+        DeleteObject(hfont);
+    }
 }
 
 static void test_ScriptShape(HDC hdc)




More information about the wine-cvs mailing list