+ DALI_LOG_INFO(gLogFilter, Debug::General, "<--MultilanguageSupport::ValidateFonts\n");
+}
+
+void MultilanguageSupport::AddCurrentScriptAndCreatNewScript(const Script requestedScript,
+ const bool isRightToLeft,
+ const bool addScriptCharactersToNewScript,
+ ScriptRun& currentScriptRun,
+ Length& numberOfAllScriptCharacters,
+ Vector<ScriptRun>& scripts,
+ ScriptRunIndex& scriptIndex)
+{
+ // Add the pending characters to the current script
+ currentScriptRun.characterRun.numberOfCharacters += (addScriptCharactersToNewScript ? 0u : numberOfAllScriptCharacters);
+
+ // In-case the current script is empty then no need to add it for scripts
+ if(0u != currentScriptRun.characterRun.numberOfCharacters)
+ {
+ // Store the script run.
+ scripts.Insert(scripts.Begin() + scriptIndex, currentScriptRun);
+ ++scriptIndex;
+ }
+
+ // Initialize the new one by the requested script
+ currentScriptRun.characterRun.characterIndex = currentScriptRun.characterRun.characterIndex + currentScriptRun.characterRun.numberOfCharacters;
+ currentScriptRun.characterRun.numberOfCharacters = (addScriptCharactersToNewScript ? numberOfAllScriptCharacters : 0u);
+ currentScriptRun.script = requestedScript;
+ numberOfAllScriptCharacters = 0u;
+ // Initialize whether is right to left direction
+ currentScriptRun.isRightToLeft = isRightToLeft;