From: Grigori Goronzy Date: Thu, 13 Aug 2009 15:25:56 +0000 (+0200) Subject: Scale ascender/descender for opaque boxes X-Git-Tag: 0.9.8~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=236d5a44034883e126df6e18e3520598155b5f98;p=libass Scale ascender/descender for opaque boxes --- 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 },