[vlc-commits] text_renderer: freetype: fix character level wrapping
Francois Cartegnie
git at videolan.org
Thu Jun 8 14:34:24 CEST 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jun 8 13:58:02 2017 +0200| [a1bf659c8237124ae440c6de56e64f2d199cf4a7] | committer: Francois Cartegnie
text_renderer: freetype: fix character level wrapping
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a1bf659c8237124ae440c6de56e64f2d199cf4a7
---
modules/text_renderer/freetype/text_layout.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/text_renderer/freetype/text_layout.c b/modules/text_renderer/freetype/text_layout.c
index 130ab69c60..c29846f51e 100644
--- a/modules/text_renderer/freetype/text_layout.c
+++ b/modules/text_renderer/freetype/text_layout.c
@@ -1430,10 +1430,10 @@ static int LayoutParagraph( filter_t *p_filter, paragraph_t *p_paragraph,
}
int i_newline_start;
- if( i_last_space > i_line_start )
- i_newline_start = i_last_space;
+ if( i_last_space > i_line_start && p_run->p_style->e_wrapinfo == STYLE_WRAP_DEFAULT )
+ i_newline_start = i_last_space; /* we break line on last space */
else
- i_newline_start = i;
+ i_newline_start = i; /* we break line on last char */
if( LayoutLine( p_filter, p_paragraph, i_line_start,
i_newline_start - 1, pp_line, b_grid ) )
More information about the vlc-commits
mailing list