Log which Fonts are selected for each script 04/36304/1
authorPaul Wisbey <p.wisbey@samsung.com>
Wed, 4 Mar 2015 16:34:19 +0000 (16:34 +0000)
committerPaul Wisbey <p.wisbey@samsung.com>
Wed, 4 Mar 2015 16:34:19 +0000 (16:34 +0000)
Change-Id: I2fd1a055cb37c35895c3da49d503457f55f3457c

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

index 27d0ee2..051b35a 100644 (file)
@@ -36,6 +36,13 @@ namespace Dali
 namespace Toolkit
 {
 
 namespace Toolkit
 {
 
+namespace
+{
+#if defined(DEBUG_ENABLED)
+Debug::Filter* gLogFilter = Debug::Filter::New(Debug::Concise, true, "LOG_MULTI_LANGUAGE_SUPPORT");
+#endif
+}
+
 namespace Text
 {
 
 namespace Text
 {
 
@@ -499,6 +506,11 @@ void MultilanguageSupport::ValidateFonts( const Vector<Character>& text,
         // Find a default font.
         fontId = fontClient.FindDefaultFont( character, pointSize );
 
         // Find a default font.
         fontId = fontClient.FindDefaultFont( character, pointSize );
 
+#ifdef DEBUG_ENABLED
+        Dali::TextAbstraction::FontDescription description;
+        fontClient.GetDescription( fontId, description );
+        DALI_LOG_INFO( gLogFilter, Debug::Concise, "Script: %s; Selected font: %s\n", Dali::TextAbstraction::ScriptName[script], description.path.c_str() );
+#endif
         // Cache the font.
         *( defaultFontPerScriptCacheBuffer + script ) = fontId;
       }
         // Cache the font.
         *( defaultFontPerScriptCacheBuffer + script ) = fontId;
       }