diff options
author | Raph Levien <raph@google.com> | 2012-05-01 09:42:31 -0700 |
---|---|---|
committer | Raph Levien <raph@google.com> | 2012-05-01 13:41:22 -0700 |
commit | 580c68b86c79b455bdae828456ff68e89137eeef (patch) | |
tree | ca44c626f3746aa0f2838ccc9b7a7eb56c5b16aa | |
parent | a91c24cd8be65d06ffdb70f798b2c928fe65b929 (diff) | |
download | harfbuzz-580c68b86c79b455bdae828456ff68e89137eeef.tar.gz |
Make Arabic script runs longer (for performance) - bug 6426451.android-cts-4.1_r4android-cts-4.1_r2android-cts-4.1_r1android-4.1.2_r2.1android-4.1.2_r2android-4.1.2_r1android-4.1.1_r6.1android-4.1.1_r6android-4.1.1_r5android-4.1.1_r4android-4.1.1_r3android-4.1.1_r2android-4.1.1_r1.1android-4.1.1_r1tools_r21jb-releasejb-mr0-releasejb-dev
Change-Id: I38b145aed01968fe9895b3d629dc0ab48ccbff97
-rwxr-xr-x | contrib/harfbuzz-unicode.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/harfbuzz-unicode.c b/contrib/harfbuzz-unicode.c index 432d5b0..29c14b3 100755 --- a/contrib/harfbuzz-unicode.c +++ b/contrib/harfbuzz-unicode.c @@ -78,6 +78,13 @@ script_property_cmp(const void *vkey, const void *vcandidate) { HB_Script code_point_to_script(uint32_t cp) { + /* BEGIN android-changed + For the purpose of aggregating script runs together, we treat space + as belonging to the same script as surrounding characters. This is a + performance optimization to keep the number of runs down. */ + if (cp == ' ') return HB_Script_Inherited; + /* END android-changed */ + const void *vprop = bsearch((void *) (intptr_t) cp, script_properties, script_properties_count, sizeof(struct script_property), |