diff options
author | Oleg Oshmyan <chortos@inbox.lv> | 2013-12-26 02:33:57 +0200 |
---|---|---|
committer | Oleg Oshmyan <chortos@inbox.lv> | 2014-01-07 22:24:12 +0200 |
commit | 9f2ffc03574ae323867fba00f8aaacc637bb0aa1 (patch) | |
tree | 4ed72d1a7a4cca47963108652aa35675ff9816a0 | |
parent | 5fbb8398a2aad73e3a7b188caf95b23598e305bb (diff) | |
download | libass-9f2ffc03574ae323867fba00f8aaacc637bb0aa1.tar.bz2 libass-9f2ffc03574ae323867fba00f8aaacc637bb0aa1.tar.xz |
Fix \fs+ and \fs-
The argument is a relative amount. The unit is: \fs+1 = +10%.
-rw-r--r-- | libass/ass_parse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libass/ass_parse.c b/libass/ass_parse.c index d2feff3b..be22a087 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) |