qt/qt-x11-opensource-src-4.3.4...

41 lines
1.8 KiB
Diff

--- qt-x11-opensource-src-4.3.4/src/gui/text/qscriptengine.cpp 2008-02-19 23:17:19.000000000 +0530
+++ qscriptengine.cpp_mod 2008-04-01 17:39:48.000000000 +0530
@@ -2174,7 +2174,7 @@ static const unsigned char indicPosition
None, None, None, None,
None, None, None, None,
- None, None, None, None,
+ Below, None, None, None,
None, None, None, None,
None, None, None, None,
None, None, None, None,
@@ -2814,7 +2814,7 @@ static bool indic_shape_syllable(QOpenTy
int script = item->script;
Q_ASSERT(script >= QUnicodeTables::Devanagari && script <= QUnicodeTables::Sinhala);
const unsigned short script_base = 0x0900 + 0x80*(script-QUnicodeTables::Devanagari);
- const unsigned short ra = script_base + 0x30;
+ unsigned short ra = script_base + 0x30;
const unsigned short halant = script_base + 0x4d;
const unsigned short nukta = script_base + 0x3c;
@@ -2856,6 +2856,19 @@ static bool indic_shape_syllable(QOpenTy
unsigned short *uc = reordered.data();
bool beginsWithRa = false;
+ // Exception in Bengali Script
+ //
+ // Bengali script supports two languages bengali and assamese
+ // Unfortunately for both languages there is different ra defined in same script chart
+ // for Bengali it ra is 'Base+ 0x30' and for assamese 'Base+0x70'
+ // Base is same 0x0980
+ // To handle this exception we need to change ra to from const to normal variable
+ // and aslo need to change ra to 'Base+0x70' whenever we will get assamese language
+ //character in data
+ if((script == QUnicodeTables::Bengali) && (*uc==0x09F0)){
+ ra = script_base + 0x70;
+ }
+
// Rule 1: find base consonant
//
// The shaping engine finds the base consonant of the