1 #ifndef __DALI_TOOLKIT_TEXT_ABSTRACTION_SCRIPT_H__
2 #define __DALI_TOOLKIT_TEXT_ABSTRACTION_SCRIPT_H__
5 * Copyright (c) 2015 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.
22 #include <dali/public-api/text-abstraction/text-abstraction-definitions.h>
27 namespace TextAbstraction
31 * @brief Script is the writing system used by a language.
32 * Typically one script can be used to write different languages although one language could be written in different scrips.
36 LATIN, ///< The latin script. Used by many western languages and others around the world.
37 ARABIC, ///< The arabic script. Used by Arab and Urdu among others.
38 DEVANAGARI, ///< The devanagari script. Used by Hindi, Marathi, Sindhi, Nepali and Sanskrit.
39 BENGALI, ///< The Bengali script. Used by Bangla, Assamese, Bishnupriya Manipuri, Daphla, Garo, Hallam, Khasi, Mizo, Munda, Naga, Rian, and Santali.
40 GURMUKHI, ///< The Gurmukhi script. Used by Punjabi.
41 GUJARATI, ///< The Gujarati script. Used by Gujarati.
42 ORIYA, ///< The Oriya script. Used by Oriya (Odia), Khondi, and Santali.
43 TAMIL, ///< The Tamil script. Used by Tamil, Badaga, and Saurashtra.
44 TELUGU, ///< The Telugu script. Used by Telugu, Gondi, and Lambadi.
45 KANNADA, ///< The Kannada script. Used by Kannada and Tulu.
46 MALAYALAM, ///< The Malayalam script. Used by Malayalam.
47 SINHALA, ///< The Sinhala script. Used by Sinhala and Pali.
48 CJK, ///< The CJK script. Used by Chinese, Japanese, Korean and Vietnamese(old writing system).
49 HANGUL, ///< The Hangul jamo script. Used by Korean.
50 KHMER, ///< The Khmer script. Used by the Khmer language.
51 LAO, ///< The Lao script. Used by the Lao language.
52 THAI, ///< The Thai script. Used by the Thai language
53 BURMESE, ///< The Burmese script. Used by the Burmese (Myanmar) language.
54 EMOJI, ///< The Emoji which map to standardized Unicode characters.
55 UNKNOWN ///< The script is unknown.
58 const char* const ScriptName[] =
60 "LATIN", ///< The latin script. Used by many western languages and others around the world.
61 "ARABIC", ///< The arabic script. Used by Arab and Urdu among others.
62 "DEVANAGARI", ///< The devanagari script. Used by Hindi, Marathi, Sindhi, Nepali and Sanskrit.
63 "BENGALI", ///< The Bengali script. Used by Bangla, Assamese, Bishnupriya Manipuri, Daphla, Garo, Hallam, Khasi, Mizo, Munda, Naga, Rian, and Santali.
64 "GURMUKHI", ///< The Gurmukhi script. Used by Punjabi.
65 "GUJARATI", ///< The Gujarati script. Used by Gujarati.
66 "ORIYA", ///< The Oriya script. Used by Oriya (Odia), Khondi, and Santali.
67 "TAMIL", ///< The Tamil script. Used by Tamil, Badaga, and Saurashtra.
68 "TELUGU", ///< The Telugu script. Used by Telugu, Gondi, and Lambadi.
69 "KANNADA", ///< The Kannada script. Used by Kannada and Tulu.
70 "MALAYALAM", ///< The Malayalam script. Used by Malayalam.
71 "SINHALA", ///< The Sinhala script. Used by Sinhala and Pali.
72 "CJK", ///< The CJK script. Used by Chinese, Japanese, Korean and Vietnamese(old writing system).
73 "HANGUL", ///< The Hangul jamo script. Used by Korean.
74 "KHMER", ///< The Khmer script. Used by the Khmer language.
75 "LAO", ///< The Lao script. Used by the Lao language.
76 "THAI", ///< The Thai script. Used by the Thai language
77 "BURMESE", ///< The Burmese script. Used by the Burmese (Myanmar) language.
78 "EMOJI", ///< The Emoji which map to standardized Unicode characters.
79 "UNKNOWN" ///< The script is unknown.
83 * @brief Whether the script is a right to left script.
85 * @param[in] script The script.
87 * @return @e true if the script is right to left.
89 bool IsRightToLeftScript( Script script );
92 * @brief Retrieves a character's script.
94 * @param[in] character The character.
96 * @return The chraracter's script.
98 Script GetCharacterScript( Character character );
101 * @brief Whether the character is a white space.
103 * @param[in] character The character.
105 * @return @e true if the character is a white space.
107 bool IsWhiteSpace( Character character );
110 * @brief Whether the character is a new paragraph character.
112 * @param[in] character The character.
114 * @return @e true if the character is a new paragraph character.
116 bool IsNewParagraph( Character character );
119 * @brief Whether the character is a zero width non joiner.
121 * @param[in] character The character.
123 * @return @e true if the character is a zero width non joiner.
125 bool IsZeroWidthNonJoiner( Character character );
128 * @brief Whether the character is a zero width joiner.
130 * @param[in] character The character.
132 * @return @e true if the character is a zero width joiner.
134 bool IsZeroWidthJoiner( Character character );
137 * @brief Whether the character is a zero width space.
139 * @param[in] character The character.
141 * @return @e true if the character is a zero width space.
143 bool IsZeroWidthSpace( Character character );
146 * @brief Whether the character is a left to right mark.
148 * @param[in] character The character.
150 * @return @e true if the character is a left to right mark.
152 bool IsLeftToRightMark( Character character );
155 * @brief Whether the character is a right to left mark.
157 * @param[in] character The character.
159 * @return @e true if the character is a right to left mark.
161 bool IsRightToLeftMark( Character character );
164 * @brief Whether the character is a thin space.
166 * @param[in] character The character.
168 * @return @e true if the character is a thin space.
170 bool IsThinSpace( Character character );
172 } // namespace TextAbstraction
176 #endif // __DALI_TOOLKIT_TEXT_ABSTRACTION_SCRIPT_H__