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=4e090e095517d54278ce80dd55764c449a3bb338;hp=460fb02847cc5d08bbd095040861e32dfb82ec21;hb=f3cd2c3c30817bbb889e8ba8ce6b1106a1617e82;hpb=47efa8dabe5f3ca6609ff43a622a5f8fcd6311ec diff --git a/dali-toolkit/internal/text/layouts/layout-engine.cpp b/dali-toolkit/internal/text/layouts/layout-engine.cpp index 460fb02..4e090e0 100644 --- a/dali-toolkit/internal/text/layouts/layout-engine.cpp +++ b/dali-toolkit/internal/text/layouts/layout-engine.cpp @@ -219,33 +219,30 @@ struct LayoutEngine::Impl if( TextAbstraction::LINE_MUST_BREAK == lineBreakInfo ) { - if( glyphIndex == lastGlyphIndex ) + // Must break the line. Update the line layout and return. + lineLayout.numberOfCharacters += tmpLineLayout.numberOfCharacters; + lineLayout.numberOfGlyphs += tmpLineLayout.numberOfGlyphs; + lineLayout.length += tmpLineLayout.length; + + if( 0.f < tmpLineLayout.length ) + { + lineLayout.length += lineLayout.wsLengthEndOfLine; + + lineLayout.wsLengthEndOfLine = tmpLineLayout.wsLengthEndOfLine; + } + else { - // Must break the line. Update the line layout and return. - lineLayout.numberOfCharacters += tmpLineLayout.numberOfCharacters; - lineLayout.numberOfGlyphs += tmpLineLayout.numberOfGlyphs; - lineLayout.length += tmpLineLayout.length; - - if( 0.f < tmpLineLayout.length ) - { - lineLayout.length += lineLayout.wsLengthEndOfLine; - - lineLayout.wsLengthEndOfLine = tmpLineLayout.wsLengthEndOfLine; - } - else - { - lineLayout.wsLengthEndOfLine += tmpLineLayout.wsLengthEndOfLine; - } - - if( tmpLineLayout.height > lineLayout.height ) - { - lineLayout.height = tmpLineLayout.height; - } - - if( tmpLineLayout.ascender > lineLayout.ascender ) - { - lineLayout.ascender = tmpLineLayout.ascender; - } + lineLayout.wsLengthEndOfLine += tmpLineLayout.wsLengthEndOfLine; + } + + if( tmpLineLayout.height > lineLayout.height ) + { + lineLayout.height = tmpLineLayout.height; + } + + if( tmpLineLayout.ascender > lineLayout.ascender ) + { + lineLayout.ascender = tmpLineLayout.ascender; } tmpLineLayout.numberOfCharacters = 0u;