X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Flayouts%2Flayout-engine.cpp;h=ad513a82672ea0799a000f7ea0314bedf6fae48b;hp=9062b07c1d3d0d337365a0c1f1bdbee554e61bb3;hb=0031ca8312dba666109e4f7fbb62a3a5e288b7c2;hpb=2047844bb3b4a84231905c8c540d34d4c468e5ad diff --git a/dali-toolkit/internal/text/layouts/layout-engine.cpp b/dali-toolkit/internal/text/layouts/layout-engine.cpp index 9062b07..ad513a8 100644 --- a/dali-toolkit/internal/text/layouts/layout-engine.cpp +++ b/dali-toolkit/internal/text/layouts/layout-engine.cpp @@ -451,7 +451,6 @@ struct LayoutEngine::Impl const GlyphInfo& glyph = *glyphsBuffer; float penX = ( 0.f > glyph.xBearing ) ? -glyph.xBearing : 0.f; - penX += mCursorWidth; // Added to give some space to the cursor. for( GlyphIndex i = 0u; i < numberOfGlyphs; ++i ) { @@ -672,7 +671,6 @@ struct LayoutEngine::Impl const GlyphInfo& glyph = *( layoutParameters.glyphsBuffer + *( layoutParameters.charactersToGlyphsBuffer + characterVisualIndex ) ); float penX = ( 0.f > glyph.xBearing ) ? -glyph.xBearing : 0.f; - penX += mCursorWidth; // Added to give some space to the cursor. Vector2* glyphPositionsBuffer = glyphPositions.Begin(); @@ -768,10 +766,12 @@ struct LayoutEngine::Impl { if( isLastLine && !isRTL ) { + // Add the length of the white saces at the end of the line. lineLength += line.extraLength; if( lineLength > boxWidth ) { - lineLength = boxWidth; + // The line's length is longer than the box's width. + // Set the line's offset to 0 and nothing else to do. line.alignmentOffset = 0.f; break; }