From fd31db0942835fccbf5d2ae21a764e73150e6870 Mon Sep 17 00:00:00 2001 From: Joogab Yun Date: Fri, 21 Jun 2019 11:19:14 +0900 Subject: [PATCH 1/1] Change to output in priority order. ex) The current character(0x2665) is emoji script. 'UIFont' and 'EMOJI' font have '0x2665' unicode. The priority of font is 'UIFont' -> 'EMOJI'. The now behavior is that we find and output glyphs in EMOJI fonts. because the current character is an emoji script. However, we want to be output from a high priority 'UIFont'. so modified it. and If you want to print emoji fonts, you can add variation unicode. 0x2665+variation unicode = at 'EMOJI' font file The logic to check variation unicode will be added later. Change-Id: Id5b54a75280d1678874665a42291facdbce72042 --- .../internal/text/multi-language-support-impl.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/dali-toolkit/internal/text/multi-language-support-impl.cpp b/dali-toolkit/internal/text/multi-language-support-impl.cpp index 81d815c..a8834b9 100755 --- a/dali-toolkit/internal/text/multi-language-support-impl.cpp +++ b/dali-toolkit/internal/text/multi-language-support-impl.cpp @@ -585,16 +585,6 @@ void MultilanguageSupport::ValidateFonts( const Vector& text, // Checks if the current character is supported by the selected font. isValidFont = fontClient.IsCharacterSupportedByFont( fontId, character ); - // Emojis are present in many monochrome fonts; prefer color by default. - if( isValidFont && - isEmojiScript ) - { - const GlyphIndex glyphIndex = fontClient.GetGlyphIndex( fontId, character ); - - // For color emojis, the font is valid if the glyph is a color glyph (the bitmap is RGBA). - isValidFont = fontClient.IsColorGlyph( fontId, glyphIndex ); - } - // If there is a valid font, cache it. if( isValidFont && !isCommonScript ) { @@ -630,14 +620,11 @@ void MultilanguageSupport::ValidateFonts( const Vector& text, DefaultFonts* defaultFontsPerScript = NULL; - // Emojis are present in many monochrome fonts; prefer color by default. - const bool preferColor = ( TextAbstraction::EMOJI == script ); - // Find a fallback-font. fontId = fontClient.FindFallbackFont( character, currentFontDescription, currentFontPointSize, - preferColor ); + false ); if( 0u == fontId ) { -- 2.7.4