Modify linebreak unit when creating LineLayout 13/166613/5
authorminho.sun <minho.sun@samsung.com>
Thu, 11 Jan 2018 06:33:32 +0000 (15:33 +0900)
committerMinho Sun <minho.sun@samsung.com>
Mon, 27 Aug 2018 06:45:39 +0000 (06:45 +0000)
 - period is reconized word unit.
 - In the past, if the text exceeded the line layout size, only the
   period was down to another line.
 - Modify line breaks to linebreak instead of Wordbreak.

Change-Id: Ice94c19550807f5e7d8907152e07ec0aaa4c6e10
Signed-off-by: minho.sun <minho.sun@samsung.com>
dali-toolkit/internal/text/layouts/layout-engine.cpp

index af257ff..4ace75b 100644 (file)
@@ -281,9 +281,6 @@ struct Engine::Impl
       // Get the line break info for the current character.
       const LineBreakInfo lineBreakInfo = hasCharacters ? *( parameters.lineBreakInfoBuffer + characterLastIndex ) : TextAbstraction::LINE_NO_BREAK;
 
       // Get the line break info for the current character.
       const LineBreakInfo lineBreakInfo = hasCharacters ? *( parameters.lineBreakInfoBuffer + characterLastIndex ) : TextAbstraction::LINE_NO_BREAK;
 
-      // Get the word break info for the current character.
-      const WordBreakInfo wordBreakInfo = *( parameters.wordBreakInfoBuffer + characterLastIndex );
-
       // Increase the number of characters.
       tmpLineLayout.numberOfCharacters += charactersPerGlyph;
 
       // Increase the number of characters.
       tmpLineLayout.numberOfCharacters += charactersPerGlyph;
 
@@ -458,7 +455,7 @@ struct Engine::Impl
       }
 
       if( isMultiline &&
       }
 
       if( isMultiline &&
-          ( TextAbstraction::WORD_BREAK == wordBreakInfo ) )
+          ( TextAbstraction::LINE_ALLOW_BREAK == lineBreakInfo ) )
       {
         oneWordLaidOut = isWordLaidOut;
         DALI_LOG_INFO( gLogFilter, Debug::Verbose, "  One word laid-out\n" );
       {
         oneWordLaidOut = isWordLaidOut;
         DALI_LOG_INFO( gLogFilter, Debug::Verbose, "  One word laid-out\n" );