1 #ifndef DALI_TOOLKIT_TEXT_ABSTRACTION_EMOJI_CHARACTER_PROPERTIES_H
2 #define DALI_TOOLKIT_TEXT_ABSTRACTION_EMOJI_CHARACTER_PROPERTIES_H
5 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
24 #include <dali/devel-api/text-abstraction/defined-characters.h>
25 #include <dali/devel-api/text-abstraction/text-abstraction-definitions.h>
26 #include <dali/public-api/dali-adaptor-common.h>
30 namespace TextAbstraction
33 * @brief Whether the character is emoji-component | emoji-modifier | COMBINING-ENCLOSING-KEYCAP | regional-indicator | TextPresentationSelector | EmojiPresentationSelector | TagSpec | TagEnd.
35 * @param[in] character The character
37 * @return @e true if the character is emoji-component | emoji-modifier | COMBINING-ENCLOSING-KEYCAP | regional-indicator | TextPresentationSelector | EmojiPresentationSelector | TagSpec | TagEnd.
39 DALI_ADAPTOR_API bool IsEmojiItem(Character character);
42 * @brief Whether the character is emoji component.
43 * Emoji Properties and Data Files: https://www.unicode.org/reports/tr51/#Emoji_Properties_and_Data_Files
45 * @note True for characters used in emoji sequences that normally do not appear on emoji keyboards as separate choices, such as keycap base characters or Regional_Indicator characters.
47 * @param[in] character The character.
49 * @return @e true if the character is emoji component.
51 DALI_ADAPTOR_API bool IsEmojiComponent(Character character);
54 * @brief Whether the character is emoji modifier.
55 * Emoji Properties and Data Files: https://www.unicode.org/reports/tr51/#Emoji_Properties_and_Data_Files
57 * @param[in] character The character.
59 * @return @e true if the character is emoji modifier.
61 DALI_ADAPTOR_API bool IsEmojiModifier(Character character);
64 * @brief Whether the character is COMBINING ENCLOSING KEYCAP.
65 * Combining Enclosing Keycap: https://emojipedia.org/combining-enclosing-keycap/
67 * @note The Codepoint of COMBINING ENCLOSING KEYCAP is {U+20E3}
69 * @param[in] character The character.
71 * @return @e true if the character is COMBINING ENCLOSING KEYCAP.
73 DALI_ADAPTOR_API bool IsCombiningEnclosingKeycap(Character character);
76 * @brief Whether the character is Regional Indicator.
77 * Regional Indicator Symbol Letter A: https://emojipedia.org/regional-indicator-symbol-letter-a/
78 * Regional Indicator Symbol Letter Z: https://emojipedia.org/regional-indicator-symbol-letter-z/
80 * @note The Codepoints of Regional Indicator Symbol Letters [A-Z] are [U+1F1E6 - U+1F1FF]
83 * @param[in] character The character.
85 * @return @e true if the character is Regional Indicator.
87 DALI_ADAPTOR_API bool IsRegionalIndicator(Character character);
90 * @brief Whether the character is text presentation selector (VARIATION SELECTOR-15).
91 * Text Presentation Selector: https://www.unicode.org/reports/tr51/#def_text_presentation_selector
93 * @note The character U+FE0E VARIATION SELECTOR-15 (VS15), used to request a text presentation for an emoji character. Also known as text variation selector.
95 * @param[in] character The character.
97 * @return @e true if the character is text presentation selector (VARIATION SELECTOR-15).
99 DALI_ADAPTOR_API bool IsTextPresentationSelector(Character character);
102 * @brief Whether the character is emoji variation selector (VARIATION SELECTOR-16).
103 * Emoji Presentation Selector: https://www.unicode.org/reports/tr51/#def_emoji_presentation_selector
105 * @note The character U+FE0F VARIATION SELECTOR-16 (VS16), used to request an emoji presentation for an emoji character. Also known as emoji variation selector.
107 * @param[in] character The character.
109 * @return @e true if the character is emoji presentation selector (VARIATION SELECTOR-16).
111 DALI_ADAPTOR_API bool IsEmojiPresentationSelector(Character character);
114 * @brief Whether the character is tag spec.
115 * Emoji Tag Sequence (ETS): https://www.unicode.org/reports/tr51/#def_emoji_tag_sequence
117 * @note The tag_spec consists of all characters from U+E0020 TAG SPACE to U+E007E TAG TILDE.
118 * Each tag_spec defines a particular visual variant to be applied to the tag_base character(s).
119 * Though tag_spec includes the values U+E0041 TAG LATIN CAPITAL LETTER A .. U+E005A TAG LATIN CAPITAL LETTER Z,
120 * they are not used currently and are reserved for future extensions.
122 * @param[in] character The character.
124 * @return @e true if the character is tag spec.
126 DALI_ADAPTOR_API bool IsTagSpec(Character character);
129 * @brief Whether the character is tag end.
130 * Emoji Tag Sequence (ETS): https://www.unicode.org/reports/tr51/#def_emoji_tag_sequence
132 * @note The tag_end consists of the character U+E007F CANCEL TAG, and must be used to terminate the tag sequence.
134 * @param[in] character The character.
136 * @return @e true if the character is tag end.
138 DALI_ADAPTOR_API bool IsTagEnd(Character character);
141 * @brief Whether the character is Miscellaneous Symbols and Arrows emoji.
142 * Miscellaneous Symbols and Arrows emoji: https://unicode-table.com/en/blocks/miscellaneous-symbols-and-arrows/
144 * @note The Range is 2B00—2BFF and the quantity of characters is 256.
146 * @param[in] character The character.
148 * @return @e true if the character is Miscellaneous Symbols and Arrows emoji.
150 DALI_ADAPTOR_API bool IsMiscellaneousSymbolsAndArrowsEmoji(Character character);
153 * @brief Whether the character is Dingbats emoji.
154 * Dingbats emoji: https://unicode-table.com/en/blocks/dingbats/
156 * @note The Range is 2700—27BF and the quantity of characters is 192.
158 * @param[in] character The character.
160 * @return @e true if the character is Dingbats emoji.
162 DALI_ADAPTOR_API bool IsDingbatsEmoji(Character character);
165 * @brief Whether the character is ASCII digits.
166 * ASCII digits: https://unicode-table.com/en/blocks/basic-latin/
168 * @note The Range is 0030—0039 and the quantity of characters is 10.
170 * @param[in] character The character.
172 * @return @e true if the character is ASCII digits.
174 DALI_ADAPTOR_API bool IsASCIIDigits(Character character);
177 * @brief Whether the character is emoji-variation-sequences.
178 * Emoji Variation Sequences for UTS #51: https://www.unicode.org/Public/14.0.0/ucd/emoji/emoji-variation-sequences.txt
180 * @param[in] character The character.
182 * @return @e true if the character is emoji-variation-sequences.
184 DALI_ADAPTOR_API bool IsEmojiVariationSequences(Character character);
187 * @brief Whether the character is Negative Squared Latin Capital Letter.
188 * Read more at White on black squared Latin letters: https://unicode-table.com/en/blocks/enclosed-alphanumeric-supplement/
191 * @param[in] character The character.
193 * @return @e true if the character is Negative Squared Latin Capital Letter.
195 DALI_ADAPTOR_API bool IsNegativeSquaredLatinCapitalLetter(Character character);
197 } // namespace TextAbstraction
201 #endif // DALI_TOOLKIT_TEXT_ABSTRACTION_EMOJI_CHARACTER_PROPERTIES_H