X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=dali-toolkit%2Finternal%2Ftext%2Fmulti-language-support-impl.cpp;h=020a5cbe38d9a2b9385029c6d694d4d62b8b6606;hb=efb94d8c348a12264e102ccf085ab5d707c85826;hp=260bd5a02f29d10d5e2f39d95f6211163d81892a;hpb=a68dbe03813fd3db34c81f4e6960572e8882930b;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/multi-language-support-impl.cpp b/dali-toolkit/internal/text/multi-language-support-impl.cpp index 260bd5a..020a5cb 100644 --- a/dali-toolkit/internal/text/multi-language-support-impl.cpp +++ b/dali-toolkit/internal/text/multi-language-support-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -477,9 +477,9 @@ void MultilanguageSupport::ValidateFonts( const Vector& text, currentFontId = fontId; // Get the script for the current character. - const Script script = GetScript( index, - scriptRunIt, - scriptRunEndIt ); + Script script = GetScript( index, + scriptRunIt, + scriptRunEndIt ); #ifdef DEBUG_ENABLED { @@ -494,6 +494,10 @@ void MultilanguageSupport::ValidateFonts( const Vector& text, description.path.c_str() ); } #endif + if (script == TextAbstraction::UNKNOWN) + { + script = TextAbstraction::LATIN; + } // Validate whether the current character is supported by the given font. bool isValidFont = false; @@ -609,8 +613,9 @@ void MultilanguageSupport::ValidateFonts( const Vector& text, if( !isValidFont ) // (3) { // The given font has not been validated. + int validCharacterIndex = fontClient.GetGlyphIndex(cachedDefaultFontId, character ); - if( isValidCachedDefaultFont ) + if( isValidCachedDefaultFont && validCharacterIndex != 0u ) { // Use the cached default font for the script if there is one. fontId = cachedDefaultFontId;