From 09dc5513f0d938e00d19919a586a8ab73fb13d21 Mon Sep 17 00:00:00 2001 From: Francisco Santos Date: Tue, 5 Dec 2017 23:21:04 +0000 Subject: [PATCH 1/1] Fix bug with mixed language text Change-Id: I88ce12917e93e5e5624d264820b1383f718616c7 --- .../internal/text/multi-language-support-impl.cpp | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/dali-toolkit/internal/text/multi-language-support-impl.cpp b/dali-toolkit/internal/text/multi-language-support-impl.cpp index e88a286..990d0ce 100644 --- a/dali-toolkit/internal/text/multi-language-support-impl.cpp +++ b/dali-toolkit/internal/text/multi-language-support-impl.cpp @@ -451,10 +451,6 @@ void MultilanguageSupport::ValidateFonts( const Vector& text, FontId previousFontId = 0u; bool isPreviousEmojiScript = false; - // Whether it's the first set of characters to be validated. - // Used in case the paragraph starts with characters common to all scripts. - bool isFirstSetToBeValidated = true; - CharacterIndex lastCharacter = startIndex + numberOfCharacters; for( Length index = startIndex; index < lastCharacter; ++index ) { @@ -705,12 +701,6 @@ void MultilanguageSupport::ValidateFonts( const Vector& text, } #endif - if( isFirstSetToBeValidated && !isCommonScript ) - { - currentFontRun.fontId = fontId; - isFirstSetToBeValidated = false; - } - // The font is now validated. if( ( fontId != currentFontRun.fontId ) || isNewParagraphCharacter ) @@ -728,11 +718,6 @@ void MultilanguageSupport::ValidateFonts( const Vector& text, currentFontRun.characterRun.characterIndex = currentFontRun.characterRun.characterIndex + currentFontRun.characterRun.numberOfCharacters; currentFontRun.characterRun.numberOfCharacters = 0u; currentFontRun.fontId = fontId; - - if( isNewParagraphCharacter ) - { - isFirstSetToBeValidated = true; - } } // Add one more character to the run. -- 2.7.4