diff options
author | Seigo Nonaka <nona@google.com> | 2015-10-29 18:59:30 +0900 |
---|---|---|
committer | Seigo Nonaka <nona@google.com> | 2015-12-07 16:49:16 -0800 |
commit | 369d2d44cb09ac4346cdd9e3b131bb173d764f88 (patch) | |
tree | ace4cadb36d5822b71d2859f2e523daba9fbb71d /include/minikin/FontFamily.h | |
parent | 66a34a04ab34519723f682ef2e71d22405d267c2 (diff) | |
download | android_frameworks_minikin-369d2d44cb09ac4346cdd9e3b131bb173d764f88.tar.gz android_frameworks_minikin-369d2d44cb09ac4346cdd9e3b131bb173d764f88.tar.bz2 android_frameworks_minikin-369d2d44cb09ac4346cdd9e3b131bb173d764f88.zip |
Select emoji font based on variation selectors.
If U+FE0E is appended to the emoji code point, the glyph should have a
text presentation.
On the other hand, if U+FE0F is appended to the emoji code point, the
glyph should have an emoji presentation.
Bug: 11256006
Change-Id: I5187d44500b13a138e7ffbcf2c72e2da06374c8c
Diffstat (limited to 'include/minikin/FontFamily.h')
-rw-r--r-- | include/minikin/FontFamily.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/minikin/FontFamily.h b/include/minikin/FontFamily.h index fc05e3b..776bcc4 100644 --- a/include/minikin/FontFamily.h +++ b/include/minikin/FontFamily.h @@ -48,6 +48,7 @@ public: operator bool() const { return mBits != 0; } bool isUnsupported() const { return mBits == kUnsupportedLanguage; } + bool hasEmojiFlag() const { return isUnsupported() ? false : (mBits & kEmojiFlag); } std::string getString() const; @@ -61,9 +62,10 @@ private: static const uint32_t kUnsupportedLanguage = 0xFFFFFFFFu; static const uint32_t kBaseLangMask = 0xFFFFFFu; - static const uint32_t kScriptMask = (1u << 26) - (1u << 24); static const uint32_t kHansFlag = 1u << 24; static const uint32_t kHantFlag = 1u << 25; + static const uint32_t kEmojiFlag = 1u << 26; + static const uint32_t kScriptMask = kHansFlag | kHantFlag | kEmojiFlag; uint32_t mBits; }; |