From: Bowon Ryu Date: Mon, 2 Dec 2024 08:21:30 +0000 (+0900) Subject: [Tizen] Fix colon case X-Git-Tag: accepted/tizen/7.0/unified/20241206.165036^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb38738239b1d3cf9909feabbefbfbc9e14a37c7;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git [Tizen] Fix colon case If the current script run is ASCII_DIGITS, include the colon in the same script run. Including both ASCII_DIGITS and ASCII_PS in the same script run can reduce unnecessary script run generation. But I am still not sure about this. Change-Id: Id74bf898d93df6481cf759a439b4a48c65b8198a Signed-off-by: Bowon Ryu --- diff --git a/dali-toolkit/internal/text/multi-language-support-impl.cpp b/dali-toolkit/internal/text/multi-language-support-impl.cpp index 0b6ea1d101..2ad3a8591f 100644 --- a/dali-toolkit/internal/text/multi-language-support-impl.cpp +++ b/dali-toolkit/internal/text/multi-language-support-impl.cpp @@ -40,7 +40,8 @@ Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, true, "LOG_MULT DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_FONT_PERFORMANCE_MARKER, false); -const Dali::Toolkit::Text::Character UTF32_A = 0x0041; +const Dali::Toolkit::Text::Character UTF32_A = 0x0041; +const Dali::Toolkit::Text::Character UTF32_COLON = 0x3A; } // namespace namespace Text @@ -333,8 +334,13 @@ void MultilanguageSupport::SetScripts(const Vector& text, isFirstScriptToBeSet = false; } + // If the current script run is ASCII_DIGITS and character is colon, include the colon in the same script run. + // TODO : Use the same script for all ASCII_DIGITS and ASCII_PS. + bool isColonCase = (character == UTF32_COLON) && (TextAbstraction::ASCII_DIGITS == currentScriptRun.script) && (TextAbstraction::COMMON != script); + if((script != currentScriptRun.script) && - (TextAbstraction::COMMON != script)) + (TextAbstraction::COMMON != script) && + !isColonCase) { // Current run needs to be stored and a new one initialized.