Log which Fonts are selected for each script
[platform/core/uifw/dali-toolkit.git] / 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;
       }