vlc | branch: master | Francois Cartegnie <[email protected]> | Thu Dec 21 20:49:31 2017 +0100| [42584bd48ba1b91aba6cfdab51f1b9a85773fbc0] | committer: Francois Cartegnie
text_renderer: workaround max y size limit because computed regions size usually do not match the real line size. (the right fix being to know font metrics before our renderers) refs #19230 > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=42584bd48ba1b91aba6cfdab51f1b9a85773fbc0 --- modules/text_renderer/freetype/text_layout.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/text_renderer/freetype/text_layout.c b/modules/text_renderer/freetype/text_layout.c index d6844b23d0..0761ef3cbe 100644 --- a/modules/text_renderer/freetype/text_layout.c +++ b/modules/text_renderer/freetype/text_layout.c @@ -1553,7 +1553,8 @@ int LayoutText( filter_t *p_filter, for( ; *pp_line; pp_line = &(*pp_line)->p_next ) { - i_total_height += (*pp_line)->i_height; + /* only cut at max i_max_height + 1 line due to + * approximate font sizing vs region size */ if( i_max_height > 0 && i_total_height > i_max_height ) { i_total_height = i_max_height + 1; @@ -1572,6 +1573,7 @@ int LayoutText( filter_t *p_filter, { i_max_face_height = (*pp_line)->i_height; } + i_total_height += (*pp_line)->i_height; } i_paragraph_start = i + 1; } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
