#include <dali/public-api/text-abstraction/script.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/internal/text/logical-model.h>
+#include <dali-toolkit/internal/text/logical-model-impl.h>
#include <dali-toolkit/internal/text/font-run.h>
#include <dali-toolkit/internal/text/script-run.h>
+#include <dali-toolkit/internal/text/text-io.h>
namespace Dali
{
// The font is not valid. Set to zero and a default one will be set.
fontId = 0u;
}
- else
+ else if( !IsValidForAllScripts( character ) )
{
// Add the font to the valid font cache.
validateFontsPerScript = new ValidateFontsPerScript();
}
}
}
- }
+ } // !isDefault
// The font has not been validated. Find a default one.
if( 0u == fontId )
// If the cache has not a default font, get one from the font client.
if( 0u == fontId )
{
+ // 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 );
+ fontId = fontClient.FindDefaultFont( character, pointSize, preferColor );
// If the system does not support a suitable font, fallback to Latin
if( 0u == fontId )