summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpravin.d.s <pravin.d.s@gmail.com>2010-10-11 11:25:29 (GMT)
committerQt Commercial Integration <QtCommercial@digia.com>2012-01-31 10:24:46 (GMT)
commit1bf840e2feba3bd073945eba81fb7bd62ccb2a99 (patch)
tree383916f2df47297dcb92f301b993bf1c78d7642f
parent8a3466bb2eb9d66a27b80360f080d3aec489b2d8 (diff)
downloadQt-1bf840e2feba3bd073945eba81fb7bd62ccb2a99.zip
Qt-1bf840e2feba3bd073945eba81fb7bd62ccb2a99.tar.gz
Qt-1bf840e2feba3bd073945eba81fb7bd62ccb2a99.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>
-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 b3f9577..bbf479e 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,
@@ -1742,6 +1742,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: