Check character glyph index before using cached Font 28/132928/1
authorJinho, Lee <jeano.lee@samsung.com>
Thu, 8 Jun 2017 07:20:51 +0000 (16:20 +0900)
committerJinho, Lee <jeano.lee@samsung.com>
Thu, 8 Jun 2017 09:37:30 +0000 (18:37 +0900)
CJK script use 3 fonts (chiniese. japanese, korean),
  (tizen TV has, BreezeSansChinese-Regular.ttf, BreezeSansJapanese-Regular.ttf, BreezeSansKorean-Regular.ttf)

Some CJK characters may not be included in these three fonts.
In this case, it need to search fallback font again.

Change-Id: I99ed74af3d53edd82e029331c51a8404238f7745

dali-toolkit/internal/text/multi-language-support-impl.cpp

index fd1d8e4..020a5cb 100644 (file)
@@ -613,8 +613,9 @@ void MultilanguageSupport::ValidateFonts( const Vector<Character>& text,
           if( !isValidFont ) // (3)
           {
             // The given font has not been validated.
           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;
             {
               // Use the cached default font for the script if there is one.
               fontId = cachedDefaultFontId;