Hi there,
There is a bug in processing Sinhala script. In Sinhala, ZWJ is
needed to group characters, which is different from other Indic
languages. We have fixed this in our Sinhala GNU/Linux distribution
at
http://www.linux.lk, but would be great if it is fixed in QT
proper, too :
http://cvs.linux.lk/cgi-bin/cvsweb/sinhala/qt/
Here are the screenshots of incorrect/correct rendering:
http://sinhala.linux.lk/pub/0.2/screenshots/halant-konqueror-before.png
http://sinhala.linux.lk/pub/0.2/screenshots/halant-konqueror-after.png
Please apply. It may also apply to QT4 cleanly. Please let us know
if it doesn't, so that we can create a seperate one.
Anuradha
--
http://www.linux.lk/~anuradha/
http://www.gnu.org/philosophy/no-word-attachments.html
diff -rua qt-x11-free-3.3.3.old/src/kernel/qscriptengine_x11.cpp qt-x11-free-3.3.3/src/kernel/qscriptengine_x11.cpp
--- qt-x11-free-3.3.3.old/src/kernel/qscriptengine_x11.cpp 2004-08-05 20:42:08.000000000 +0600
+++ qt-x11-free-3.3.3/src/kernel/qscriptengine_x11.cpp 2004-09-26 12:30:55.000000000 +0600
@@ -522,7 +522,7 @@
Invalid, Consonant, Invalid, Invalid,
Consonant, Consonant, Consonant, Consonant,
- Consonant, Consonant, Invalid, Invalid,
+ Consonant, Consonant, Consonant, Invalid,
Invalid, Invalid, Halant, Invalid,
Invalid, Invalid, Invalid, Matra,
@@ -1092,6 +1092,14 @@
{ (Form)0, None }
};
+static const IndicOrdering sinhala_order [] = {
+ { Matra, Below },
+ { Matra, Above },
+ { Matra, Post },
+ { VowelMark, Post },
+ { (Form)0, None }
+};
+
static const IndicOrdering * const indic_order[] = {
devanagari_order, // Devanagari
bengali_order, // Bengali
@@ -1102,7 +1110,7 @@
telugu_order, // Telugu
kannada_order, // Kannada
malayalam_order, // Malayalam
- devanagari_order // Sinhala // ### no OT specs available, we use devanagari
+ sinhala_order // Sinhala
};
@@ -1725,7 +1733,8 @@
break;
goto finish;
case Consonant:
- if ( state == Halant )
+ if ( state == Halant && (( script != QFont::Sinhala )
+ || ( uc[pos-1].unicode() == 0x200d )))
break;
goto finish;
case Halant: