const bool RTL = true;
const float LINE_SPACING= 0.f;
+inline bool isEmptyLineAtLast( const Vector<LineRun>& lines, const Vector<LineRun>::Iterator& line )
+{
+ return ( (*line).characterRun.numberOfCharacters == 0 && line + 1u == lines.End() );
+}
+
} //namespace
/**
continue;
}
- if( line.characterRun.characterIndex >= lastCharacterPlusOne )
+ if( line.characterRun.characterIndex > lastCharacterPlusOne )
{
// Do not align lines beyond the last laid-out character.
break;
}
+ if( line.characterRun.characterIndex == lastCharacterPlusOne && !isEmptyLineAtLast( lines, it ) )
+ {
+ // Do not align lines beyond the last laid-out character unless the line is last and empty.
+ break;
+ }
+
// Calculate the line's alignment offset accordingly with the align option,
// the box width, line length, and the paragraph's direction.
CalculateHorizontalAlignment( size.width,