diff options
author | Oleg Oshmyan <chortos@inbox.lv> | 2015-08-03 00:40:16 +0300 |
---|---|---|
committer | Oleg Oshmyan <chortos@inbox.lv> | 2015-08-03 00:54:51 +0300 |
commit | 23de9995103c16ceceba19cae87e328be12fa8e4 (patch) | |
tree | 8ff2d885908cba40744adff326f0b9a0db9a399a /libass | |
parent | dc78d6a0ce5a95a112b96d3b029172bb64d83252 (diff) | |
download | libass-23de9995103c16ceceba19cae87e328be12fa8e4.tar.bz2 libass-23de9995103c16ceceba19cae87e328be12fa8e4.tar.xz |
Properly skip glyphs for multiple consecutive line breaks
This corrects the calculated width of events that contain \N\N,
which previously included the width of the glyph corresponding
to '\n' (more generally, for n consecutive line breaks, only
the first glyph was skipped and n-1 glyphs were included).
Reported on IRC.
Diffstat (limited to 'libass')
-rw-r--r-- | libass/ass_render.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c index 42758c8..3fc4daf 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -1481,7 +1481,7 @@ static void trim_whitespace(ASS_Renderer *render_priv) } // A break itself can contain a whitespace, too cur = ti->glyphs + i; - if (cur->symbol == ' ') { + if (cur->symbol == ' ' || cur->symbol == '\n') { cur->skip++; // Mark whitespace after j = i + 1; |