From 108122c6a960d27bc0354391a22189bfd376f72f Mon Sep 17 00:00:00 2001 From: Victor Cebollada Date: Fri, 3 Feb 2017 14:05:55 +0000 Subject: [PATCH] [3.0] Javanese and Sundanese scripts added. Change-Id: Ib70b0776ec3e8e1c6805f2985b9d49c80c9f75dd Signed-off-by: Victor Cebollada --- text/dali/devel-api/text-abstraction/script.cpp | 19 +++++++++++++++++++ text/dali/devel-api/text-abstraction/script.h | 4 ++++ text/dali/internal/text-abstraction/shaping-impl.cpp | 2 ++ 3 files changed, 25 insertions(+) diff --git a/text/dali/devel-api/text-abstraction/script.cpp b/text/dali/devel-api/text-abstraction/script.cpp index 265e9aa..e0e4c26 100644 --- a/text/dali/devel-api/text-abstraction/script.cpp +++ b/text/dali/devel-api/text-abstraction/script.cpp @@ -225,6 +225,13 @@ Script GetCharacterScript( Character character ) // 0x0530 - 0x058f Armenian // 0xfb13 - 0xfb17 Armenian subset of Alphabetic prefentation forms + // Javanese script + // 0xa980 - 0xa9fd Javanese + + // Sundanese script + // 0x1b80 - 0x1bbf Sundanese + // 0x1cc0 - 0x1ccf Sundanese supplement + // The Emoji which map to standardized Unicode characters // 1. Emoticons ( 1F601 - 1F64F ) // 2. Dingbats ( 2702 - 27B0 ) @@ -439,6 +446,14 @@ Script GetCharacterScript( Character character ) { return KHMER; } + if( ( 0x1b80 <= character ) && ( character <= 0x1bbf ) ) + { + return SUNDANESE; + } + if( ( 0x1cc0 <= character ) && ( character <= 0x1ccf ) ) + { + return SUNDANESE; + } if( ( 0x1d00 <= character ) && ( character <= 0x1eff ) ) { if( ( 0x1D26 <= character ) && ( character <= 0x1D2B ) ) @@ -680,6 +695,10 @@ Script GetCharacterScript( Character character ) { return HANGUL; } + if( ( 0xa980 <= character ) && ( character <= 0xa9fd ) ) + { + return JAVANESE; + } if( ( 0xab30 <= character ) && ( character <= 0xab6f ) ) { return LATIN; diff --git a/text/dali/devel-api/text-abstraction/script.h b/text/dali/devel-api/text-abstraction/script.h index 753563e..163aae2 100644 --- a/text/dali/devel-api/text-abstraction/script.h +++ b/text/dali/devel-api/text-abstraction/script.h @@ -88,6 +88,8 @@ enum Script LAO, ///< The Lao script. Used by the Lao language. THAI, ///< The Thai script. Used by the Thai language KHMER, ///< The Khmer script. Used by the Khmer language. + JAVANESE, ///< The Javanese script. Used by the Javanese language. + SUNDANESE, ///< The Sundanese script. Used by the Sundanese language. EMOJI, ///< The Emoji which map to standardized Unicode characters. @@ -154,6 +156,8 @@ const char* const ScriptName[] = "LAO", ///< The Lao script. Used by the Lao language. "THAI", ///< The Thai script. Used by the Thai language "KHMER", ///< The Khmer script. Used by the Khmer language. + "JAVANESE", ///< The Javanese script. Used by the Javanese language. + "SUNDANESE", ///< The Sundanese script. Used by the Sundanese language. "EMOJI", ///< The Emoji which map to standardized Unicode characters. diff --git a/text/dali/internal/text-abstraction/shaping-impl.cpp b/text/dali/internal/text-abstraction/shaping-impl.cpp index ae87d94..3df10a2 100644 --- a/text/dali/internal/text-abstraction/shaping-impl.cpp +++ b/text/dali/internal/text-abstraction/shaping-impl.cpp @@ -94,6 +94,8 @@ const hb_script_t SCRIPT_TO_HARFBUZZ[] = HB_SCRIPT_LAO, HB_SCRIPT_THAI, HB_SCRIPT_KHMER, + HB_SCRIPT_JAVANESE, + HB_SCRIPT_SUNDANESE, HB_SCRIPT_UNKNOWN, // EMOJI HB_SCRIPT_UNKNOWN, // SYMBOLS1 -- 2.7.4