From efb94d8c348a12264e102ccf085ab5d707c85826 Mon Sep 17 00:00:00 2001 From: "Jinho, Lee" Date: Thu, 8 Jun 2017 16:20:51 +0900 Subject: [PATCH] Check character glyph index before using cached Font 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dali-toolkit/internal/text/multi-language-support-impl.cpp b/dali-toolkit/internal/text/multi-language-support-impl.cpp index fd1d8e4..020a5cb 100644 --- a/dali-toolkit/internal/text/multi-language-support-impl.cpp +++ b/dali-toolkit/internal/text/multi-language-support-impl.cpp @@ -613,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; -- 2.7.4