[vlc-commits] freetype: fix first backgrounds alignment
    Francois Cartegnie 
    git at videolan.org
       
    Wed Aug  5 19:56:17 CEST 2015
    
    
  
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Aug  5 19:23:04 2015 +0200| [24a593632a50984aef6296c5b124a1b74a38fd2e] | committer: Francois Cartegnie
freetype: fix first backgrounds alignment
fixes the second line background alignment which is always wrong.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=24a593632a50984aef6296c5b124a1b74a38fd2e
---
 modules/text_renderer/freetype.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/text_renderer/freetype.c b/modules/text_renderer/freetype.c
index 6b24586..2e049f5 100644
--- a/modules/text_renderer/freetype.c
+++ b/modules/text_renderer/freetype.c
@@ -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;
    
    
More information about the vlc-commits
mailing list