]> granicus.if.org Git - libass/commitdiff
Calculate text bounding box in such way that it does not depend on the height
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Tue, 19 Sep 2006 17:40:31 +0000 (17:40 +0000)
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Tue, 19 Sep 2006 17:40:31 +0000 (17:40 +0000)
of individual glyphs.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19910 b3059339-0415-0410-9bf9-f77b7e298cf2

libass/ass_render.c

index 4bf9103d791e49a887d643453c3b0cea6f6c5d4e..3e0d4a308bc0e1da04e2e131aefd32b3f3b44b6a 100644 (file)
@@ -1686,6 +1686,8 @@ static int ass_render_event(ass_event_t* event, event_images_t* event_images)
        
        // determing text bounding box
        compute_string_bbox(&text_info, &bbox);
+       bbox.yMin = - (text_info.lines[0].asc >> 6);
+       bbox.yMax = (text_info.height - text_info.lines[0].asc) >> 6;
        
        // determine device coordinates for text