[vlc-commits] text_renderer: freetype: fix skipped ruby ending lines
Francois Cartegnie
git at videolan.org
Mon Feb 19 15:19:51 CET 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Feb 19 15:18:04 2018 +0100| [4258b772da52d2368f3b521dd63749bada2ebade] | committer: Francois Cartegnie
text_renderer: freetype: fix skipped ruby ending lines
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4258b772da52d2368f3b521dd63749bada2ebade
---
modules/text_renderer/freetype/text_layout.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/text_renderer/freetype/text_layout.c b/modules/text_renderer/freetype/text_layout.c
index 106d6f1ba1..13efd567b4 100644
--- a/modules/text_renderer/freetype/text_layout.c
+++ b/modules/text_renderer/freetype/text_layout.c
@@ -1516,7 +1516,8 @@ static int LayoutParagraph( filter_t *p_filter, paragraph_t *p_paragraph,
const ruby_block_t *p_rubyseq = p_paragraph->pp_ruby[i];
int i_advance = 0;
int i_advanceruby = p_rubyseq->p_laid->i_width;
- while( i < p_paragraph->i_size && p_rubyseq == p_paragraph->pp_ruby[i] )
+ while( i + 1 < p_paragraph->i_size &&
+ p_rubyseq == p_paragraph->pp_ruby[i + 1] )
i_advance += p_paragraph->p_glyph_bitmaps[ i++ ].i_x_advance;
/* Just forward as non breakable */
i_width += (i_advance < i_advanceruby) ? i_advanceruby : i_advance;
More information about the vlc-commits
mailing list