From 873b7b3e703e0f228f8d2d12896def00e281adf2 Mon Sep 17 00:00:00 2001 From: claireho Date: Fri, 9 Dec 2011 14:03:58 -0800 Subject: Fixed bug in Indic shapping. Bug5733237 : Bengali init feature should only apply to beginning of a word. A bug caused by the truncation loss in isLtter() and isMark() of harfbuzz-indic.cpp. Change-Id: I23fedf28ff580747a33d4db19402d064cb290cd7 --- src/harfbuzz-indic.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/harfbuzz-indic.cpp b/src/harfbuzz-indic.cpp index 4d8418b..038160e 100755 --- a/src/harfbuzz-indic.cpp +++ b/src/harfbuzz-indic.cpp @@ -37,7 +37,10 @@ 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; + // BEGIN android-changed + // Check the value is zero or not instead of casting int to HB_Bool(unsigned char). + return (FLAG(HB_GetUnicodeCharCategory(ucs)) & test) != 0; + // END android-changed } static HB_Bool isMark(HB_UChar16 ucs) @@ -45,7 +48,10 @@ static HB_Bool isMark(HB_UChar16 ucs) const int test = FLAG(HB_Mark_NonSpacing) | FLAG(HB_Mark_SpacingCombining) | FLAG(HB_Mark_Enclosing); - return FLAG(HB_GetUnicodeCharCategory(ucs)) & test; + // BEGIN android-changed + // Check the value is zero or not instead of casting int to HB_Bool(unsigned char). + return (FLAG(HB_GetUnicodeCharCategory(ucs)) & test) != 0; + // END android-changed } enum Form { -- cgit v1.2.3