Cache fallback font lists for each requested font 04/48304/2
authorPaul Wisbey <p.wisbey@samsung.com>
Thu, 17 Sep 2015 18:08:25 +0000 (19:08 +0100)
committerPaul Wisbey <p.wisbey@samsung.com>
Fri, 18 Sep 2015 08:55:08 +0000 (01:55 -0700)
Change-Id: I0b05f4e9a2495fea62bde613f716f2727a9e4251

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

index 8e55537..37cf040 100644 (file)
@@ -428,6 +428,7 @@ void MultilanguageSupport::ValidateFonts( const Vector<Character>& text,
 
     // Whether the font being validated is a default one not set by the user.
     const bool isDefault = ( 0u == fontId );
+    FontId preferredFont = fontId;
 
     DALI_LOG_INFO( gLogFilter,
                    Debug::Verbose,
@@ -525,8 +526,8 @@ void MultilanguageSupport::ValidateFonts( const Vector<Character>& text,
         // Emojis are present in many monochrome fonts; prefer color by default.
         bool preferColor = ( TextAbstraction::EMOJI == script );
 
-        // Find a default font.
-        fontId = fontClient.FindDefaultFont( character, pointSize, preferColor );
+        // Find a fallback-font.
+        fontId = fontClient.FindFallbackFont( preferredFont, character, pointSize, preferColor );
 
         // If the system does not support a suitable font, fallback to Latin
         if( 0u == fontId )