]> granicus.if.org Git - libass/commitdiff
Fix bounding box calculation with \fscx/\fscy.
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Mon, 19 Feb 2007 18:37:54 +0000 (18:37 +0000)
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Mon, 19 Feb 2007 18:37:54 +0000 (18:37 +0000)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22279 b3059339-0415-0410-9bf9-f77b7e298cf2

libass/ass_render.c

index 18b64d764a04b4cbdf352ea24eb36b66f09cb4a0..67e8d71ea599725bb99e0aa28cca8e80387abadf 100644 (file)
@@ -1293,9 +1293,9 @@ static void measure_text()
                if (i < text_info.length) {
                        glyph_info_t* cur = text_info.glyphs + i;
                        if (cur->asc > max_asc)
-                               max_asc = cur->asc * render_context.scale_y;
+                               max_asc = cur->asc;
                        if (cur->desc > max_desc)
-                               max_desc = cur->desc * render_context.scale_y;
+                               max_desc = cur->desc;
                }
        }
 }
@@ -1739,6 +1739,8 @@ static int ass_render_event(ass_event_t* event, event_images_t* event_images)
                ass_font_get_asc_desc(render_context.font, code,
                                      &text_info.glyphs[text_info.length].asc,
                                      &text_info.glyphs[text_info.length].desc);
+               text_info.glyphs[text_info.length].asc *= render_context.scale_y;
+               text_info.glyphs[text_info.length].desc *= render_context.scale_y;
 
                text_info.length++;