From b8051ea784546e7a554573bb857b3468548e604e Mon Sep 17 00:00:00 2001 From: Victor Cebollada Date: Wed, 8 Jul 2015 11:56:35 +0100 Subject: [PATCH] Bopomofo script added. * Phonetic notation used for the transcription of spoken Chinese. Change-Id: I491d59b36e73bd31687ccc690ab2ddf661a0e938 Signed-off-by: Victor Cebollada --- text/dali/devel-api/text-abstraction/script.cpp | 12 ++++++++++++ text/dali/devel-api/text-abstraction/script.h | 2 ++ text/dali/internal/text-abstraction/shaping-impl.cpp | 1 + 3 files changed, 15 insertions(+) diff --git a/text/dali/devel-api/text-abstraction/script.cpp b/text/dali/devel-api/text-abstraction/script.cpp index f794f78..6629a21 100644 --- a/text/dali/devel-api/text-abstraction/script.cpp +++ b/text/dali/devel-api/text-abstraction/script.cpp @@ -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; diff --git a/text/dali/devel-api/text-abstraction/script.h b/text/dali/devel-api/text-abstraction/script.h index 06b1301..c8939c6 100644 --- a/text/dali/devel-api/text-abstraction/script.h +++ b/text/dali/devel-api/text-abstraction/script.h @@ -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. diff --git a/text/dali/internal/text-abstraction/shaping-impl.cpp b/text/dali/internal/text-abstraction/shaping-impl.cpp index 5e33fa5..ccdf4bc 100644 --- a/text/dali/internal/text-abstraction/shaping-impl.cpp +++ b/text/dali/internal/text-abstraction/shaping-impl.cpp @@ -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, -- 2.7.4