summaryrefslogtreecommitdiffstats
path: root/libass/ass_parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'libass/ass_parse.c')
-rw-r--r--libass/ass_parse.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libass/ass_parse.c b/libass/ass_parse.c
index a0181bd..afa0019 100644
--- a/libass/ass_parse.c
+++ b/libass/ass_parse.c
@@ -47,17 +47,18 @@ static inline int mystrcmp(char **p, const char *sample)
return 0;
}
-static void change_font_size(ASS_Renderer *render_priv, double sz)
+double ensure_font_size(ASS_Renderer *priv, double size)
{
- double size = sz * render_priv->font_scale;
-
if (size < 1)
size = 1;
- else if (size > render_priv->height * 2)
- size = render_priv->height * 2;
+ else if (size > priv->height * 2)
+ size = priv->height * 2;
- ass_font_set_size(render_priv->state.font, size);
+ return size;
+}
+static void change_font_size(ASS_Renderer *render_priv, double sz)
+{
render_priv->state.font_size = sz;
}