From 6842c622d8b68251f7d696d22bfa44a16c0bef46 Mon Sep 17 00:00:00 2001 From: Raph Levien Date: Fri, 19 Oct 2012 14:00:56 -0700 Subject: Fix to make space width consistent in bidi This is a fix for bug 7363916, where the inconsistent breaking of the text into script runs was leading to a different measured width on paint than on measure for a TextView, leading to the content being ellipsized. This patch classifies the space as Latin, rather than the script of the surrounding text, which means that it's always drawn from the Latin font, and thus is measured consistently. Change-Id: I07abfa2918698c93f55333f1e964cc24a18d3def --- contrib/harfbuzz-unicode.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/contrib/harfbuzz-unicode.c b/contrib/harfbuzz-unicode.c index 29c14b3..432d5b0 100755 --- a/contrib/harfbuzz-unicode.c +++ b/contrib/harfbuzz-unicode.c @@ -78,13 +78,6 @@ 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), -- cgit v1.2.3