summaryrefslogtreecommitdiffstats
path: root/libs/minikin/GraphemeBreak.cpp
diff options
context:
space:
mode:
authorSeigo Nonaka <nona@google.com>2016-02-25 17:07:42 +0900
committerSeigo Nonaka <nona@google.com>2016-02-26 11:26:30 +0900
commit0036da164e3b25f1ac29c840c1fe15b03dc6677f (patch)
treedfc0752fe5b816e262695b5a5a693dcec89bf3cf /libs/minikin/GraphemeBreak.cpp
parent94d5525508b60407c9224fbd279a9f6932d5fb6c (diff)
downloadandroid_frameworks_minikin-0036da164e3b25f1ac29c840c1fe15b03dc6677f.tar.gz
android_frameworks_minikin-0036da164e3b25f1ac29c840c1fe15b03dc6677f.tar.bz2
android_frameworks_minikin-0036da164e3b25f1ac29c840c1fe15b03dc6677f.zip
Use color font if skin tone is specified.
If skin tone is specified, the base emoji should be emoji style even if it is text presentation default emoji. This patch also removes wrong test case which expects default emoji presentation but it is controlled by family order in /etc/fonts.xml and there is no special logic for default presentation in minikin. Thus the default presentation unit test should not be in minikin. Bug: 27342346 Change-Id: I74a2b2feab4d559535049e368cfd833063cce81c
Diffstat (limited to 'libs/minikin/GraphemeBreak.cpp')
-rw-r--r--libs/minikin/GraphemeBreak.cpp43
1 files changed, 1 insertions, 42 deletions
diff --git a/libs/minikin/GraphemeBreak.cpp b/libs/minikin/GraphemeBreak.cpp
index 4141091..ef323d5 100644
--- a/libs/minikin/GraphemeBreak.cpp
+++ b/libs/minikin/GraphemeBreak.cpp
@@ -19,6 +19,7 @@
#include <unicode/utf16.h>
#include <minikin/GraphemeBreak.h>
+#include "MinikinInternal.h"
namespace android {
@@ -77,48 +78,6 @@ bool isZwjEmoji(uint32_t c) {
|| c == 0x1F5E8); // LEFT SPEECH BUBBLE
}
-// Based on Modifiers from http://www.unicode.org/L2/L2016/16011-data-file.txt
-bool isEmojiModifier(uint32_t c) {
- return (0x1F3FB <= c && c <= 0x1F3FF);
-}
-
-// Based on Emoji_Modifier_Base from
-// http://www.unicode.org/Public/emoji/3.0/emoji-data.txt
-bool isEmojiBase(uint32_t c) {
- if (0x261D <= c && c <= 0x270D) {
- return (c == 0x261D || c == 0x26F9 || (0x270A <= c && c <= 0x270D));
- } else if (0x1F385 <= c && c <= 0x1F93E) {
- return (c == 0x1F385
- || (0x1F3C3 <= c || c <= 0x1F3C4)
- || (0x1F3CA <= c || c <= 0x1F3CB)
- || (0x1F442 <= c || c <= 0x1F443)
- || (0x1F446 <= c || c <= 0x1F450)
- || (0x1F466 <= c || c <= 0x1F469)
- || c == 0x1F46E
- || (0x1F470 <= c || c <= 0x1F478)
- || c == 0x1F47C
- || (0x1F481 <= c || c <= 0x1F483)
- || (0x1F485 <= c || c <= 0x1F487)
- || c == 0x1F4AA
- || c == 0x1F575
- || c == 0x1F57A
- || c == 0x1F590
- || (0x1F595 <= c || c <= 0x1F596)
- || (0x1F645 <= c || c <= 0x1F647)
- || (0x1F64B <= c || c <= 0x1F64F)
- || c == 0x1F6A3
- || (0x1F6B4 <= c || c <= 0x1F6B6)
- || c == 0x1F6C0
- || (0x1F918 <= c || c <= 0x1F91E)
- || c == 0x1F926
- || c == 0x1F930
- || (0x1F933 <= c || c <= 0x1F939)
- || (0x1F93B <= c || c <= 0x1F93E));
- } else {
- return false;
- }
-}
-
bool GraphemeBreak::isGraphemeBreak(const uint16_t* buf, size_t start, size_t count,
size_t offset) {
// This implementation closely follows Unicode Standard Annex #29 on