// EMOJI Sequences case for coverage.
std::string emojiSequences =
- "Glyphs not included in the font \n" //case for coverage when glyph is not included in the font
- "Text VS15 ☪︎\n" //text presentation sequence and selector
- "Color VS16 ☪️\n" //emoji presentation sequence and selector
- "Default ☪ \n" //default presentation
+ "Glyphs not included in the font \n" // case for coverage when glyph is not included in the font
+ "Text VS15 ☪︎\n" // text presentation sequence and selector
+ "Color VS16 ☪️\n" // emoji presentation sequence and selector
+ "Default ☪ \n" // default presentation
+ "\U0001F465\ufe0f\U0001F468\u200d\U0001F469\u200D\U0001F467\u200D\U0001F466\n" // negative emoji presentation sequence and selector
"FamilyManWomanGirlBoy 👨‍👩‍👧‍👦\n" // emoji multi zwj sequence
"WomanScientist 👩‍🔬\n" // emoji zwj sequence
"WomanScientistLightSkinTone👩🏻‍🔬 \n" // emoji modifier sequence: skin tone & JWZ
const Dali::Toolkit::Text::Character UTF32_A = 0x0041;
const Dali::Toolkit::Text::Character UTF32_COLON = 0x3A;
+const Dali::Toolkit::Text::Character UTF32_EMOJI = 0x1F600; // Grinning Face
const char* DALI_TEXT_ENABLE_ICU("DALI_TEXT_ENABLE_ICU");
const int DEFAULT_ENABLE_ICU = 0;
if(TextAbstraction::IsEmojiTextScript(script))
{
// Find a fallback-font.
- requestedFontId = fontClient.FindFallbackFont(character,
- currentFontDescription,
- currentFontPointSize,
- false);
-
+ requestedFontId = fontClient.FindFallbackFont(character, currentFontDescription, currentFontPointSize, false);
if(fontClient.IsColorGlyph(requestedFontId, glyphIndexChar))
{
// Try to find text style glyph.
requestedFontId = 0;
}
}
+ else if(TextAbstraction::IsEmojiColorScript(script) && TextAbstraction::IsEmojiPresentationSelector(character))
+ {
+ if(IsEmojiScript(previousScript) && fontClient.IsColorFont(previousFontId))
+ {
+ requestedFontId = previousFontId;
+ }
+ else
+ {
+ // There are Color emoji fonts that do not have Variation Selector glyphs. Search for fonts using the basic emoji unicode code point.
+ requestedFontId = fontClient.FindFallbackFont(UTF32_EMOJI, currentFontDescription, currentFontPointSize, true);
+ }
+ }
if(0u == requestedFontId)
{
requestedFontId = fontClient.FindDefaultFont(character, currentFontPointSize, IsEmojiColorScript(script));