- TextViewProcessor::CharacterLayoutInfo& characterLayoutInfo( *charIt );
- lastCharHeight = characterLayoutInfo.mSize.height * shrinkFactor;
-
- const float previousPositionY = isFirstChar ? 0.f : previousPosition.y;
-
- if( ( isNewLine || isFirstChar ) ||
- ( isFirstCharOfWord && ( wordOffset + wordLayoutInfo.mSize.width * shrinkFactor > parentWidth ) ) )
- {
- isFirstChar = false;
-
- // Calculates the line length and the max character height for the current line.
- TextViewRelayout::SubLineLayoutInfo subLineInfo;
- subLineInfo.mLineLength = 0.f;
- subLineInfo.mMaxCharHeight = 0.f;
- subLineInfo.mMaxAscender = 0.f;
- TextViewRelayout::CalculateSubLineLayout( parentWidth,
- indices,
- lineLayoutInfo,
- TextViewRelayout::WrapByWord,
- shrinkFactor,
- subLineInfo );
-
- characterLayoutInfo.mPosition = Vector3( 0.f, previousPositionY + subLineInfo.mMaxCharHeight + layoutParameters.mLineHeightOffset * shrinkFactor, 0.f );
-
- newTextHeight += subLineInfo.mMaxCharHeight + layoutParameters.mLineHeightOffset * shrinkFactor;
-
- Toolkit::TextView::LineLayoutInfo lineInfo;
- lineInfo.mCharacterGlobalIndex = characterGlobalIndex; // Index to the first character of the next line.
- lineInfo.mSize = Size( subLineInfo.mLineLength, subLineInfo.mMaxCharHeight ); // Size of this piece of line.
- lineInfo.mAscender = subLineInfo.mMaxAscender; // Ascender of this piece of line.
- relayoutData.mLines.push_back( lineInfo );
-
-
- // Stores some info to calculate the line justification in a post-process.
- TextView::LineJustificationInfo justificationInfo;
-
- justificationInfo.mIndices = indices;
- justificationInfo.mLineLength = subLineInfo.mLineLength;
-
- relayoutData.mLineJustificationInfo.push_back( justificationInfo );
- }
- else
- {
- characterLayoutInfo.mPosition = previousPosition + Vector3( previousSize.width, 0.f, 0.f );
- }
+ isFirstChar = false;
+
+ // Calculates the line length and the max character height for the current line.
+ TextViewRelayout::LineLayoutInfo subLineInfo;
+ subLineInfo.mLineLength = 0.f;
+ subLineInfo.mMaxCharHeight = 0.f;
+ subLineInfo.mMaxAscender = 0.f;
+ TextViewRelayout::CalculateLineLayout( parentWidth,
+ indices,
+ paragraphLayoutInfo,
+ TextViewRelayout::WrapByWord,
+ shrinkFactor,
+ subLineInfo );
+
+ characterLayoutInfo.mPosition = Vector3( 0.f, previousPositionY + subLineInfo.mMaxCharHeight + layoutParameters.mLineHeightOffset * shrinkFactor, 0.f );
+
+ newTextHeight += subLineInfo.mMaxCharHeight + layoutParameters.mLineHeightOffset * shrinkFactor;
+
+ Toolkit::TextView::LineLayoutInfo lineInfo;
+ lineInfo.mCharacterGlobalIndex = characterGlobalIndex; // Index to the first character of the next line.
+ lineInfo.mSize = Size( subLineInfo.mLineLength, subLineInfo.mMaxCharHeight ); // Size of this piece of paragraph.
+ lineInfo.mAscender = subLineInfo.mMaxAscender; // Ascender of this piece of paragraph.
+ relayoutData.mLines.push_back( lineInfo );
+ }
+ else
+ {
+ characterLayoutInfo.mPosition = previousPosition + Vector3( previousSize.width, 0.f, 0.f );
+ }