From 3941a22bfd36fe2866c2e0da93dbea2c60ec7c22 Mon Sep 17 00:00:00 2001 From: Fabrice Di Meglio Date: Tue, 24 Jan 2012 16:44:00 -0800 Subject: [PATCH] Fix bug #5901103 all_source_project_146981_Android - Android ICS LQA Regression:FA, AR, HE and TH - Font Corruption - use the first char of the "run" instead of the "string" for the BaseGlyphCount Change-Id: I647528ec912bb69655cf301bbc73b66dc1a6fc82 --- core/jni/android/graphics/TextLayoutCache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/jni/android/graphics/TextLayoutCache.cpp b/core/jni/android/graphics/TextLayoutCache.cpp index d26f563519ade..bd44a96ad4c9e 100644 --- a/core/jni/android/graphics/TextLayoutCache.cpp +++ b/core/jni/android/graphics/TextLayoutCache.cpp @@ -811,7 +811,7 @@ size_t TextLayoutEngine::shapeFontRun(SkPaint* paint, bool isRTL) { case HB_Script_Hebrew: case HB_Script_Bengali: case HB_Script_Thai:{ - const uint16_t* text16 = (const uint16_t*)mShaperItem.string; + const uint16_t* text16 = (const uint16_t*)(mShaperItem.string + mShaperItem.item.pos); SkUnichar firstUnichar = SkUTF16_NextUnichar(&text16); baseGlyphCount = paint->getBaseGlyphCount(firstUnichar); break;