+ // Previous script has the same direction than the first script of the paragraph.
+ // All the previously skipped characters need to be added to the previous script before it's stored.
+ currentScriptRun.characterRun.numberOfCharacters += numberOfAllScriptCharacters;
+ numberOfAllScriptCharacters = 0u;
+ }
+ else if( ( TextAbstraction::IsRightToLeftScript( currentScriptRun.script ) == TextAbstraction::IsRightToLeftScript( script ) ) &&
+ ( TextAbstraction::UNKNOWN != currentScriptRun.script ) )
+ {
+ // Current script and previous one have the same direction.