From 9f2ffc03574ae323867fba00f8aaacc637bb0aa1 Mon Sep 17 00:00:00 2001 From: Oleg Oshmyan Date: Thu, 26 Dec 2013 02:33:57 +0200 Subject: [PATCH] Fix \fs+ and \fs- The argument is a relative amount. The unit is: \fs+1 = +10%. --- libass/ass_parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.40.0