summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2009-11-05 15:57:16 +0100
committerLars Knoll <lars.knoll@nokia.com>2009-11-05 15:57:16 +0100
commite66916e33821e71ba19479c32108a2be8bb539b2 (patch)
treed24201c1e0988267fd3c14dc7f1601967dffba52
parente8a057fb67a0242e5a125d8cb2c823ad63e01449 (diff)
fix shaping of assamese ra
See http://bugreports.qt.nokia.com/browse/QTBUG-1802
-rw-r--r--src/harfbuzz-indic.cpp6
-rw-r--r--tests/shaping/main.cpp12
2 files changed, 16 insertions, 2 deletions
diff --git a/src/harfbuzz-indic.cpp b/src/harfbuzz-indic.cpp
index 48f4f90..df447e6 100644
--- a/src/harfbuzz-indic.cpp
+++ b/src/harfbuzz-indic.cpp
@@ -566,7 +566,7 @@ static const unsigned char indicPosition[0xe00-0x900] = {
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,
@@ -1252,7 +1252,9 @@ static bool indic_shape_syllable(HB_Bool openType, HB_ShaperItem *item, bool inv
// farther than 3 consonants from the end of the syllable.
// #### replace the HasReph property by testing if the feature exists in the font!
if (form(*uc) == Consonant || (script == HB_Script_Bengali && form(*uc) == IndependentVowel)) {
- beginsWithRa = (properties & HasReph) && ((len > 2) && *uc == ra && *(uc+1) == halant);
+ if ((properties & HasReph) && (len > 2) &&
+ (*uc == ra || *uc == 0x9f0) && *(uc+1) == halant)
+ beginsWithRa = true;
if (beginsWithRa && form(*(uc+2)) == Control)
beginsWithRa = false;
diff --git a/tests/shaping/main.cpp b/tests/shaping/main.cpp
index a7ea417..9b6aa31 100644
--- a/tests/shaping/main.cpp
+++ b/tests/shaping/main.cpp
@@ -515,6 +515,12 @@ void tst_QScriptEngine::bengali()
{ 0x179, 0x151, 0x172, 0x0 } },
{ { 0x995, 0x9c7, 0x9d7, 0x0 },
{ 0x179, 0x151, 0x17e, 0x0 } },
+ { { 0x9b0, 0x9cd, 0x9ad, 0x0 },
+ { 0x168, 0x276, 0x0 } },
+ { { 0x9f0, 0x9cd, 0x9ad, 0x0 },
+ { 0x168, 0x276, 0x0 } },
+ { { 0x9f1, 0x9cd, 0x9ad, 0x0 },
+ { 0x191, 0x17d, 0x168, 0x0 } },
{ {0}, {0} }
};
@@ -652,6 +658,12 @@ void tst_QScriptEngine::bengali()
{ 0x01fe, 0x0 } },
{ { 0x09b0, 0x09cd, 0x09a8, 0x09cd, 0x200d, 0x0 },
{ 0x10b, 0x167, 0x0 } },
+ { { 0x9b0, 0x9cd, 0x9ad, 0x0 },
+ { 0xa1, 0x167, 0x0 } },
+ { { 0x9f0, 0x9cd, 0x9ad, 0x0 },
+ { 0xa1, 0x167, 0x0 } },
+ { { 0x9f1, 0x9cd, 0x9ad, 0x0 },
+ { 0x11c, 0xa1, 0x0 } },
{ {0}, {0} }
};