summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Oshmyan <chortos@inbox.lv>2013-12-26 02:33:57 +0200
committerOleg Oshmyan <chortos@inbox.lv>2014-01-07 22:24:12 +0200
commit9f2ffc03574ae323867fba00f8aaacc637bb0aa1 (patch)
tree4ed72d1a7a4cca47963108652aa35675ff9816a0
parent5fbb8398a2aad73e3a7b188caf95b23598e305bb (diff)
downloadlibass-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.c4
1 files 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)