Blame SOURCES/qt-3.3.6-fontrendering-ml_IN-209097.patch

106311
--- qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp.bak	2006-10-13 13:21:37.000000000 +0800
106311
+++ qt-x11-free-3.3.6/src/kernel/qscriptengine_x11.cpp	2006-10-13 13:57:36.000000000 +0800
106311
@@ -868,7 +868,7 @@
106311
     None, None, None, None,
106311
     None, None, None, Post,
106311
 
106311
-    Post, None, Below, None,
106311
+    None, None, None, None,
106311
     None, Post, None, None,
106311
     None, None, None, None,
106311
     None, None, Post, Post,
106311
@@ -1271,6 +1271,16 @@
106311
     int base = 0;
106311
     int reph = -1;
106311
 
106311
+    //for the special conjuctions about Cons+0d4d+0d30 and Cons+0d40+0d31 of Malayalam
106311
+    bool is_special_conjuction_malayalam = false;
106311
+	
106311
+    if ((len == 3) && 
106311
+	((reordered[2] == 0x0d30) || (reordered[2] == 0x0d31)) && 
106311
+	(reordered[1] == 0x0d4d) && 
106311
+	((reordered[0] >= 0x0d15) && (reordered[0] <= 0x0d39))) {
106311
+        is_special_conjuction_malayalam = true;
106311
+    }
106311
+
106311
 #ifdef INDIC_DEBUG
106311
     IDEBUG("original:");
106311
     for (i = 0; i < len; i++) {
106311
@@ -1547,6 +1557,15 @@
106311
                 reph = i;
106311
     }
106311
 
106311
+    //for the special conjuctions about Cons+0d4d+0d30 and Cons+0d40+0d31 of Malayalam
106311
+    if (is_special_conjuction_malayalam) {
106311
+        unsigned short temp;
106311
+		
106311
+	temp = reordered[0];		
106311
+	reordered[0] = reordered[2];		
106311
+	reordered[2] = temp;	
106311
+    }
106311
+
106311
     if (item->font->stringToCMap((const QChar *)reordered.data(), len, item->glyphs, item->advances,
106311
                                  &item->num_glyphs, item->flags & QTextEngine::RightToLeft) != QFontEngine::NoError)
106311
         return FALSE;
106311
@@ -1658,6 +1677,15 @@
106311
 
106311
         // halant always applies
106311
 
106311
+        //for the special conjuctions about Cons+0d4d+0d30 and Cons+0d40+0d31 of Malayalam
106311
+        if (is_special_conjuction_malayalam) {
106311
+	    unsigned int temp;
106311
+			
106311
+	    temp = properties[0];
106311
+	    properties[0] = ~PreSubstProperty;			
106311
+	    properties[2] = temp; 
106311
+	}
106311
+
106311
 #ifdef INDIC_DEBUG
106311
         {
106311
             IDEBUG("OT properties:");