- // If this character layout has no text-actor is because this character has the same style than previous one.
- // Add the character to the current text-actor and update the size.
- if( characterLayoutInfo.mIsVisible && ( TextViewProcessor::LineSeparator != wordLayoutInfo.mType ) )
+ TextActor textActor = TextActor::DownCast( characterLayoutInfo.mGlyphActor );
+ if( textActor )
+ {
+ // There is a new text-actor. Set text and everything to the previous one.
+ if( currentTextActorInfo.textActor )
+ {
+ currentTextActorInfo.textActor.SetText( currentTextActorInfo.text );
+ currentTextActorInfo.textActor.SetPosition( currentTextActorInfo.position );
+ currentTextActorInfo.textActor.SetSize( currentTextActorInfo.size );
+
+ SetVisualParameters( currentTextActorInfo,
+ visualParameters,
+ relayoutData,
+ lineLayoutInfo.mSize.height );
+ }
+
+ currentTextActorInfo.text = characterLayoutInfo.mStyledText.mText;
+ currentTextActorInfo.position = Vector3( characterLayoutInfo.mPosition.x + characterLayoutInfo.mOffset.x,
+ characterLayoutInfo.mPosition.y + characterLayoutInfo.mOffset.y,
+ characterLayoutInfo.mPosition.z );
+ currentTextActorInfo.size = characterLayoutInfo.mSize * relayoutData.mShrinkFactor;
+
+ currentTextActorInfo.color = characterLayoutInfo.mStyledText.mStyle.GetTextColor();
+ currentTextActorInfo.color.a = characterLayoutInfo.mColorAlpha;
+
+ currentTextActorInfo.gradientColor = characterLayoutInfo.mGradientColor;
+ currentTextActorInfo.startPoint = characterLayoutInfo.mStartPoint;
+ currentTextActorInfo.endPoint = characterLayoutInfo.mEndPoint;
+
+ // Update the current text-actor.
+ currentTextActorInfo.textActor = textActor;
+ }
+ else