aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaph Levien <raph@google.com>2012-05-01 09:42:31 -0700
committerRaph Levien <raph@google.com>2012-05-01 13:41:22 -0700
commit580c68b86c79b455bdae828456ff68e89137eeef (patch)
treeca44c626f3746aa0f2838ccc9b7a7eb56c5b16aa
parenta91c24cd8be65d06ffdb70f798b2c928fe65b929 (diff)
downloadharfbuzz-580c68b86c79b455bdae828456ff68e89137eeef.tar.gz
Change-Id: I38b145aed01968fe9895b3d629dc0ab48ccbff97
-rwxr-xr-xcontrib/harfbuzz-unicode.c7
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),