From 67cfd9efddb7b72bd17168b54a8e07be9ae44685 Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Wed, 7 Feb 2018 16:13:29 +0000 Subject: [PATCH] Update unicode range of emoji script based on the latest unicode specification Change-Id: I67934e4a16397ce8871a345cbc0cc339d2751967 --- dali/devel-api/text-abstraction/script.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/dali/devel-api/text-abstraction/script.cpp b/dali/devel-api/text-abstraction/script.cpp index 2314f2d..a22d085 100644 --- a/dali/devel-api/text-abstraction/script.cpp +++ b/dali/devel-api/text-abstraction/script.cpp @@ -250,13 +250,14 @@ Script GetCharacterScript( Character character ) // The Emoji which map to standardized Unicode characters // 1. Emoticons ( 1F601 - 1F64F ) - // 2. Dingbats ( 2702 - 27B0 ) + // 2. Dingbats ( 2700 - 27BF ) // 3. Transport and map symbols ( 1F680 - 1F6C0 ) // 4. Enclosed characters ( 24C2 - 1F251 ) // 5. Uncategorized :-S // 6. Additional Emoticons ( 1F600 - 1F636 ) - // 6b. Additional transport and map symbols ( 1F681 - 1F6C5 ) + // 6b. Additional transport and map symbols ( 1F680 - 1F6FF ): http://unicode.org/charts/PDF/U1F680.pdf // 6c. Other additional symbols ( 1F30D - 1F567 ) + // 7. Supplemental Symbols and Pictographs ( 1F900–1F9FF ): http://unicode.org/charts/PDF/U1F900.pdf // Symbols. Work around for these symbols. // 0x25cb @@ -804,8 +805,13 @@ Script GetCharacterScript( Character character ) return ARABIC; } // U+1f170 4. Enclosed characters: negative squared latin capital letter A - // U+1f6c5 6b. Additional transport and map symbols - if( ( 0x1f170 <= character ) && ( character <= 0x1f6c5 ) ) + // U+1f6ff 6b. Additional transport and map symbols + if( ( 0x1f170 <= character ) && ( character <= 0x1f6ff ) ) + { + return EMOJI; + } + // 7. Supplemental Symbols and Pictographs + if( ( 0x1f900 <= character ) && ( character <= 0x1f9ff ) ) { return EMOJI; } -- 2.7.4