From: Oleg Oshmyan Date: Thu, 26 Dec 2013 00:33:57 +0000 (+0200) Subject: Fix \fs+ and \fs- X-Git-Tag: 0.11.0~44^2~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9f2ffc03574ae323867fba00f8aaacc637bb0aa1;p=libass Fix \fs+ and \fs- The argument is a relative amount. The unit is: \fs+1 = +10%. --- diff --git a/libass/ass_parse.c b/libass/ass_parse.c index d2feff3..be22a08 100644 --- a/libass/ass_parse.c +++ b/libass/ass_parse.c @@ -380,7 +380,7 @@ char *parse_tag(ASS_Renderer *render_priv, char *p, double pwr) } else if (mystrcmp(&p, "fs+")) { double val; if (mystrtod(&p, &val)) { - val = render_priv->state.font_size + pwr * val; + val = render_priv->state.font_size * (1 + pwr * val / 10); } else val = render_priv->state.style->FontSize; if (render_priv->state.font) @@ -388,7 +388,7 @@ char *parse_tag(ASS_Renderer *render_priv, char *p, double pwr) } else if (mystrcmp(&p, "fs-")) { double val; if (mystrtod(&p, &val)) - val = render_priv->state.font_size - pwr * val; + val = render_priv->state.font_size * (1 - pwr * val / 10); else val = render_priv->state.style->FontSize; if (render_priv->state.font)