Bopomofo script added. 78/43378/3
authorVictor Cebollada <v.cebollada@samsung.com>
Wed, 8 Jul 2015 10:56:35 +0000 (11:56 +0100)
committerPaul Wisbey <p.wisbey@samsung.com>
Tue, 14 Jul 2015 14:26:38 +0000 (07:26 -0700)
* Phonetic notation used for the transcription of spoken Chinese.

Change-Id: I491d59b36e73bd31687ccc690ab2ddf661a0e938
Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
text/dali/devel-api/text-abstraction/script.cpp
text/dali/devel-api/text-abstraction/script.h
text/dali/internal/text-abstraction/shaping-impl.cpp

index f794f78..6629a21 100644 (file)
@@ -123,6 +123,10 @@ Script GetCharacterScript( Character character )
   // 0xac00 - 0xd7af Hangul Syllables
   // 0xd7b0 - 0xd7ff Hangul Jamo Extended-B
 
+  // Bopomofo script
+  // 0x3100 - 0x312f Bopomofo
+  // 0x31a0 - 0x31bf Bopomofo Extended
+
   // Khmer script
   // 0x1780 - 0x17ff Khmer
   // 0x19e0 - 0x19ff Khmer Symbols
@@ -395,10 +399,18 @@ Script GetCharacterScript( Character character )
         {
           return KATAKANA;
         }
+        if( ( 0x3100 <= character ) && ( character <= 0x312f ) )
+        {
+          return BOPOMOFO;
+        }
         if( ( 0x3130 <= character ) && ( character <= 0x318f ) )
         {
           return HANGUL;
         }
+        if( ( 0x31a0 <= character ) && ( character <= 0x31bf ) )
+        {
+          return BOPOMOFO;
+        }
         if( ( 0x3200 <= character ) && ( character <= 0x32ff ) )
         {
           return CJK;
index 06b1301..c8939c6 100644 (file)
@@ -52,6 +52,7 @@ enum Script
   HANGUL,     ///< The Hangul jamo script. Used by Korean.
   HIRAGANA,   ///< The Hiragana script. Used by the Japanese.
   KATAKANA,   ///< The Katakana script. Used by the Japanese.
+  BOPOMOFO,   ///< The Bopomofo script. Also called Zhuyin fuhao or Zhuyin. A phonetic notation used for the transcription of spoken Chinese.
 
   BENGALI,    ///< The Bengali script. Used by Bangla, Assamese, Bishnupriya Manipuri, Daphla, Garo, Hallam, Khasi, Mizo, Munda, Naga, Rian, and Santali.
   BURMESE,    ///< The Burmese script. Used by the Burmese (Myanmar) language.
@@ -92,6 +93,7 @@ const char* const ScriptName[] =
   "HANGUL",     ///< The Hangul jamo script. Used by Korean.
   "HIRAGANA",   ///< The Hiragana script. Used by the Japanese.
   "KATAKANA",   ///< The Katakana script. Used by the Japanese.
+  "BOPOMOFO",   ///< The Bopomofo script. Also called Zhuyin fuhao or Zhuyin. A phonetic notation used for the transcription of spoken Chinese.
 
   "BENGALI",    ///< The Bengali script. Used by Bangla, Assamese, Bishnupriya Manipuri, Daphla, Garo, Hallam, Khasi, Mizo, Munda, Naga, Rian, and Santali.
   "BURMESE",    ///< The Burmese script. Used by the Burmese (Myanmar) language.
index 5e33fa5..ccdf4bc 100644 (file)
@@ -61,6 +61,7 @@ const hb_script_t SCRIPT_TO_HARFBUZZ[] =
   HB_SCRIPT_HANGUL,
   HB_SCRIPT_HIRAGANA,
   HB_SCRIPT_KATAKANA,
+  HB_SCRIPT_BOPOMOFO,
 
   HB_SCRIPT_BENGALI,
   HB_SCRIPT_MYANMAR,