Commit 42584bd4 authored by François Cartegnie's avatar François 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
parent 41ef73b4
......@@ -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