From 236d5a44034883e126df6e18e3520598155b5f98 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Thu, 13 Aug 2009 17:25:56 +0200 Subject: Scale ascender/descender for opaque boxes --- libass/ass_render.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libass/ass_render.c b/libass/ass_render.c index b9125b8..7922825 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -1896,6 +1896,7 @@ static void draw_opaque_box(ASS_Renderer *render_priv, uint32_t ch, int asc = 0, desc = 0; int i; int adv = d16_to_d6(glyph->advance.x); + double scale_y = render_priv->state.scale_y; FT_OutlineGlyph og = (FT_OutlineGlyph) glyph; FT_Outline *ol; @@ -1904,6 +1905,9 @@ static void draw_opaque_box(ASS_Renderer *render_priv, uint32_t ch, sy = FFMAX(64, sy); ass_font_get_asc_desc(render_priv->state.font, ch, &asc, &desc); + asc *= scale_y; + desc *= scale_y; + FT_Vector points[4] = { { .x = -sx, .y = asc + sy }, { .x = adv + sx, .y = asc + sy }, -- cgit v1.2.3