Skip to content

Commit

Permalink
freetype: fix first backgrounds alignment
Browse files Browse the repository at this point in the history
fixes the second line background alignment which is always wrong.
  • Loading branch information
fcartegnie committed Aug 5, 2015
1 parent a2ab8b2 commit 24a5936
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/text_renderer/freetype.c
Expand Up @@ -729,7 +729,7 @@ static inline void RenderBackground( subpicture_region_t *p_region,
ExtractComponents( 0x000000, &i_x, &i_y, &i_z );

/* Compute the upper boundary for the background */
if ((i_align_top + p_line->i_base_line - max_height) < 0)
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;
else
line_top = i_align_top + p_line->i_base_line - max_height;
Expand Down

0 comments on commit 24a5936

Please sign in to comment.