currentUnderlinePosition = ceil( fabsf( fontMetrics.underlinePosition ) );
const float descender = ceil( fabsf( fontMetrics.descender ) );
- if ( underlineHeight == ZERO )
+ if( fabsf( underlineHeight ) < Math::MACHINE_EPSILON_1000 )
{
currentUnderlineThickness = fontMetrics.underlineThickness;
{
currentUnderlinePosition = descender;
}
- if ( ZERO == currentUnderlinePosition )
+ if( fabsf( currentUnderlinePosition ) < Math::MACHINE_EPSILON_1000 )
{
// Move offset down by one ( EFL behavior )
currentUnderlinePosition = ONE;
positions,
glyphs,
depth );
+
+ /* In the case where AddGlyphs does not create a renderable Actor for example when glyphs are all whitespace create a new Actor. */
+ /* This renderable actor is used to position the text, other "decorations" can rely on there always being an Actor regardless of it is whitespace or regular text*/
+ if ( !mImpl->mActor )
+ {
+ mImpl->mActor = Actor::New();
+ }
}
return mImpl->mActor;