textCacheEntry.mIndex = glyph.index;
newTextCache.PushBack( textCacheEntry );
+ // Adjust the vertices if the fixed-size font should be down-scaled
+ if( glyph.scaleFactor > 0 )
+ {
+ for( unsigned int i=0; i<newMesh.mVertices.Count(); ++i )
+ {
+ newMesh.mVertices[i].mPosition.x = position.x + ( ( newMesh.mVertices[i].mPosition.x - position.x ) * glyph.scaleFactor );
+ newMesh.mVertices[i].mPosition.y = position.y + ( ( newMesh.mVertices[i].mPosition.y - position.y ) * glyph.scaleFactor );
+ }
+ }
+
// Find an existing mesh data object to attach to ( or create a new one, if we can't find one using the same atlas)
StitchTextMesh( meshContainer,
newMesh,
// Create an effect if necessary
if ( style == STYLE_DROP_SHADOW )
{
- actor.Add( GenerateShadow( *mIt, actorSize, shadowOffset, shadowColor ) );
+ Actor shadowActor = GenerateShadow( *mIt, actorSize, shadowOffset, shadowColor );
+ shadowActor.Add( actor );
+ actor = shadowActor;
}
if( mActor )
Dali::Renderer renderer = Dali::Renderer::New( quadGeometry, material );
// Ensure shadow is behind the text...
- renderer.SetDepthIndex( CONTENT_DEPTH_INDEX + mDepth - 1 );
+ renderer.SetDepthIndex( CONTENT_DEPTH_INDEX + mDepth );
Actor actor = Actor::New();
actor.AddRenderer( renderer );
actor.SetParentOrigin( ParentOrigin::CENTER ); // Keep all of the origins aligned
subActor.AddRenderer( normRenderer );
subActor.SetParentOrigin( ParentOrigin::CENTER ); // Keep all of the origins aligned
subActor.SetSize( actorSize );
- subActor.SetColorMode( USE_OWN_MULTIPLY_PARENT_COLOR );
subActor.SetColor( shadowColor );
// Create a render task to render the effect