Commit 72b5e60f authored by François Cartegnie's avatar François Cartegnie 🤞 Committed by Jean-Baptiste Kempf

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

(cherry picked from commit 42584bd4)
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 6cc343a2
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment