aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclaireho <chinglanho@gmail.com>2011-12-09 14:03:58 -0800
committerclaireho <chinglanho@gmail.com>2011-12-09 14:51:42 -0800
commit873b7b3e703e0f228f8d2d12896def00e281adf2 (patch)
tree4473154761f65e4752fd5d56af71bc0759890dea
parente39b0cc5a6606880051b7bd6a101399cc687eabe (diff)
downloadharfbuzz-873b7b3e703e0f228f8d2d12896def00e281adf2.tar.gz
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
-rwxr-xr-xsrc/harfbuzz-indic.cpp10
1 files changed, 8 insertions, 2 deletions
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 {