X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fmulti-language-support-impl.cpp;h=37cf0405d1585632421a4cbe5652f7a15e1024c1;hb=4c1f4bfb9eb5b956b64a6c9bf077217fc0ca9234;hp=d730c9e207ab4bdb04d38f71a36c28e4fd379f01;hpb=1c1a0aa8481233240396cf469f08e524b2d86021;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/multi-language-support-impl.cpp b/dali-toolkit/internal/text/multi-language-support-impl.cpp index d730c9e..37cf040 100644 --- a/dali-toolkit/internal/text/multi-language-support-impl.cpp +++ b/dali-toolkit/internal/text/multi-language-support-impl.cpp @@ -32,7 +32,7 @@ namespace Toolkit namespace { #if defined(DEBUG_ENABLED) -Debug::Filter* gLogFilter = Debug::Filter::New(Debug::Concise, true, "LOG_MULTI_LANGUAGE_SUPPORT"); +Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, true, "LOG_MULTI_LANGUAGE_SUPPORT"); #endif const Dali::Toolkit::Text::Character UTF32_A = 0x0041; @@ -351,19 +351,19 @@ void MultilanguageSupport::ValidateFonts( const Vector& text, const Vector& scripts, Vector& fonts ) { - DALI_LOG_INFO( gLogFilter, Debug::Verbose, "-->MultilanguageSupport::ValidateFonts\n" ); + DALI_LOG_INFO( gLogFilter, Debug::General, "-->MultilanguageSupport::ValidateFonts\n" ); const Length numberOfCharacters = text.Count(); if( 0u == numberOfCharacters ) { - DALI_LOG_INFO( gLogFilter, Debug::Verbose, "<--MultilanguageSupport::ValidateFonts\n" ); + DALI_LOG_INFO( gLogFilter, Debug::General, "<--MultilanguageSupport::ValidateFonts\n" ); // Nothing to do if there are no characters. return; } // Copy the fonts set by application developers. const Length numberOfFontRuns = fonts.Count(); - const Vector definedFonts = fonts; + const Vector userSetFonts = fonts; fonts.Clear(); // Traverse the characters and validate/set the fonts. @@ -386,8 +386,8 @@ void MultilanguageSupport::ValidateFonts( const Vector& text, TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get(); // Iterators of the font and script runs. - Vector::ConstIterator fontRunIt = definedFonts.Begin(); - Vector::ConstIterator fontRunEndIt = definedFonts.End(); + Vector::ConstIterator fontRunIt = userSetFonts.Begin(); + Vector::ConstIterator fontRunEndIt = userSetFonts.End(); Vector::ConstIterator scriptRunIt = scripts.Begin(); Vector::ConstIterator scriptRunEndIt = scripts.End(); @@ -428,6 +428,7 @@ void MultilanguageSupport::ValidateFonts( const Vector& 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& 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 ) @@ -585,7 +586,7 @@ void MultilanguageSupport::ValidateFonts( const Vector& text, // Store the last run. fonts.PushBack( currentFontRun ); } - DALI_LOG_INFO( gLogFilter, Debug::Verbose, "<--MultilanguageSupport::ValidateFonts\n" ); + DALI_LOG_INFO( gLogFilter, Debug::General, "<--MultilanguageSupport::ValidateFonts\n" ); } } // namespace Internal