summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorप्रविण सातपुते <pravin.d.s@gmail.com>2010-10-11 11:25:29 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-10-11 11:25:29 (GMT)
commit76e2668a621b03ee4da423c10afac0ceb66e6a33 (patch)
tree85c0c30f4725a1cf8f2902c7d5b707489ddf346f /src/3rdparty
parentd7657d8506bf06efef6b7636d1b1cbaea0f0cfc7 (diff)
downloadQt-76e2668a621b03ee4da423c10afac0ceb66e6a33.zip
Qt-76e2668a621b03ee4da423c10afac0ceb66e6a33.tar.gz
Qt-76e2668a621b03ee4da423c10afac0ceb66e6a33.tar.bz2
Fix several errors with shaping of Indic scripts
1. The opentype init feature was applied to some characters even when the character appeared inside a word. 2. Using the ZWJ to separate Ra and Halant Ya should connect the two latter characters and form a Yaphala 3. Some Oriya chars were not correctly marked as below-base form. Task-number: QTBUG-13620, QTBUG-13616, QTBUG-13542 Merge-request: 2484 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp
index 4d8418b..817fb0d 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp
@@ -37,7 +37,7 @@ static HB_Bool isLetter(HB_UChar16 ucs)
FLAG(HB_Letter_Titlecase) |
FLAG(HB_Letter_Modifier) |
FLAG(HB_Letter_Other);
- return FLAG(HB_GetUnicodeCharCategory(ucs)) & test;
+ return (FLAG(HB_GetUnicodeCharCategory(ucs)) & test) != 0;
}
static HB_Bool isMark(HB_UChar16 ucs)
@@ -660,18 +660,18 @@ static const unsigned char indicPosition[0xe00-0x900] = {
None, None, None, None,
None, None, None, None,
- None, None, None, None,
- None, None, None, None,
- None, None, None, None,
+ None, Below, Below, Below,
+ Below, Below, Below, Below,
+ Below, Below, None, Below,
- None, None, None, None,
- Below, None, None, None,
- Below, None, None, None,
+ Below, Below, Below, Below,
+ Below, Below, Below, Below,
+ Below, None, Below, Below,
Below, Below, Below, Post,
Below, None, Below, Below,
- None, None, None, None,
- None, None, None, None,
+ None, Below, Below, Below,
+ Below, Below, None, None,
None, None, Post, Above,
Post, Below, Below, Below,
@@ -1741,6 +1741,11 @@ static int indic_nextSyllableBoundary(HB_Script script, const HB_UChar16 *s, int
if (state == Halant && uc[pos] == 0x200d /* ZWJ */)
break;
// the control character should be the last char in the item
+ if (state == Consonant && script == HB_Script_Bengali && uc[pos-1] == 0x09B0 && uc[pos] == 0x200d /* ZWJ */)
+ break;
+ if (state == Consonant && script == HB_Script_Kannada && uc[pos-1] == 0x0CB0 && uc[pos] == 0x200d /* ZWJ */)
+ break;
+ // Bengali and Kannada has a special exception for rendering yaphala with ra (to avoid reph) see http://www.unicode.org/faq/indic.html#15
++pos;
goto finish;
case Consonant: