Commit 0b6165af authored by François Cartegnie's avatar François Cartegnie 🤞
Browse files

text_renderer: freetype: fix background alignment (fix #9949)

parent ab9c3b36
...@@ -729,10 +729,9 @@ static inline void RenderBackground( subpicture_region_t *p_region, ...@@ -729,10 +729,9 @@ static inline void RenderBackground( subpicture_region_t *p_region,
ExtractComponents( 0x000000, &i_x, &i_y, &i_z ); ExtractComponents( 0x000000, &i_x, &i_y, &i_z );
/* Compute the upper boundary for the background */ /* Compute the upper boundary for the background */
if ((i_align_top + p_line->i_base_line - max_height) < 0 || p_line->i_base_line <= p_line->i_height) line_top = i_align_top + p_line->i_base_line;
line_top = i_align_top + p_line->i_base_line; if( p_line->i_height && p_line->i_height < max_height )
else line_top += max_height - p_line->i_height;
line_top = i_align_top + p_line->i_base_line - max_height;
/* Compute lower boundary for the background */ /* Compute lower boundary for the background */
line_bottom = __MIN(line_top + p_line->i_height, p_region->fmt.i_visible_height); line_bottom = __MIN(line_top + p_line->i_height, p_region->fmt.i_visible_height);
......
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