From: Grigori Goronzy Date: Thu, 12 Aug 2010 19:47:24 +0000 (+0200) Subject: Only word wrap on spaces X-Git-Tag: 0.9.12~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a3d0b507bd1bb18067de7b948f5371197dc142b9;p=libass Only word wrap on spaces It looks like VSFilter only ever wraps on spaces, even if the line length is going to overflow. We should do that as well. Fixes a pretty confusing problem with scrolling vertical text. --- diff --git a/libass/ass_render.c b/libass/ass_render.c index c960776..2fade83 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -1454,13 +1454,9 @@ wrap_lines_smart(ASS_Renderer *render_priv, double max_text_width) && (render_priv->state.wrap_style != 2)) { break_type = 1; break_at = last_space; - if (break_at == -1) - break_at = i - 1; - if (break_at == -1) - break_at = 0; - ass_msg(render_priv->library, MSGL_DBG2, "overfill at %d", i); - ass_msg(render_priv->library, MSGL_DBG2, "line break at %d", - break_at); + if (break_at >= 0) + ass_msg(render_priv->library, MSGL_DBG2, "line break at %d", + break_at); } if (break_at != -1) {