+ // If calculation is end but wsLengthEndOfLine is exist, it means end of text is space.
+ // Merge remained length.
+ if ( !parameters.ignoreSpaceAfterText && glyphIndex == lastGlyphOfParagraphPlusOne-1 && tmpLineLayout.wsLengthEndOfLine > 0 )
+ {
+ tmpLineLayout.length += tmpLineLayout.wsLengthEndOfLine;
+ tmpLineLayout.wsLengthEndOfLine = 0u;
+ }
+
+ // Save the current extra width to compare with the next one
+ mPreviousCharacterExtraWidth = tmpExtraWidth;
+