diff options
author | Grigori Goronzy <greg@blackbox> | 2010-08-12 21:47:24 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@blackbox> | 2010-08-12 21:47:24 +0200 |
commit | a3d0b507bd1bb18067de7b948f5371197dc142b9 (patch) | |
tree | 83c6d1d237e507e2f2d821524f8904c43b76bfd8 | |
parent | 265e6ec005a55ef226844715d408e77dcef886fd (diff) | |
download | libass-a3d0b507bd1bb18067de7b948f5371197dc142b9.tar.bz2 libass-a3d0b507bd1bb18067de7b948f5371197dc142b9.tar.xz |
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.
-rw-r--r-- | libass/ass_render.c | 10 |
1 files changed, 3 insertions, 7 deletions
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) { |