summaryrefslogtreecommitdiffstats
path: root/libass/ass_render.c
diff options
context:
space:
mode:
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-05-14 20:41:14 +0000
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-05-14 20:41:14 +0000
commit8513877facd5a3084465053c4f05a4d3ffd8825b (patch)
treef5364588cf497f9017877015ee41894707ad703f /libass/ass_render.c
parentb51b557529e0b83e866bc705b4f4330f013997cb (diff)
downloadmpv-8513877facd5a3084465053c4f05a4d3ffd8825b.tar.bz2
mpv-8513877facd5a3084465053c4f05a4d3ffd8825b.tar.xz
Support fractional font sizes.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23318 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libass/ass_render.c')
-rw-r--r--libass/ass_render.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libass/ass_render.c b/libass/ass_render.c
index 1b7938105f..8bbc7be931 100644
--- a/libass/ass_render.c
+++ b/libass/ass_render.c
@@ -137,7 +137,7 @@ typedef struct render_context_s {
ass_font_t* font;
char* font_path;
- int font_size;
+ double font_size;
FT_Stroker stroker;
int alignment; // alignment overrides go here; if zero, style value will be used
@@ -508,7 +508,7 @@ static inline int mystrcmp(char** p, const char* sample) {
double ass_internal_font_size_coeff = 0.8;
-static void change_font_size(int sz)
+static void change_font_size(double sz)
{
double size = sz * frame_context.font_scale;
@@ -696,8 +696,8 @@ static char* parse_tag(char* p, double pwr) {
else
render_context.hspacing = render_context.style->Spacing;
} else if (mystrcmp(&p, "fs")) {
- int val;
- if (mystrtoi(&p, 10, &val))
+ double val;
+ if (mystrtod(&p, &val))
val = render_context.font_size * ( 1 - pwr ) + val * pwr;
else
val = render_context.style->FontSize;