summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/jni/android/graphics/TextLayoutCache.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/jni/android/graphics/TextLayoutCache.cpp b/core/jni/android/graphics/TextLayoutCache.cpp
index 8ee1d8b52841..79aa43b2f90c 100644
--- a/core/jni/android/graphics/TextLayoutCache.cpp
+++ b/core/jni/android/graphics/TextLayoutCache.cpp
@@ -444,7 +444,11 @@ void TextLayoutCacheValue::computeValuesWithHarfbuzz(SkPaint* paint, const UChar
LOGD("computeValuesWithHarfbuzz -- dirFlags=%d run-count=%d paraDir=%d",
dirFlags, rc, paraDir);
#endif
- if (!U_SUCCESS(status) || rc <= 1) {
+ if (U_SUCCESS(status) && rc == 1) {
+ // Normal case: one run, status is ok
+ isRTL = (paraDir == 1);
+ useSingleRun = true;
+ } else if (!U_SUCCESS(status) || rc < 1) {
LOGW("computeValuesWithHarfbuzz -- need to force to single run");
isRTL = (paraDir == 1);
useSingleRun = true;