From 93c4e8ebf3dea5c9e1978f78a33cb961d6a1aaf7 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Fri, 19 Aug 2011 01:16:24 +0200 Subject: Use TrueType font weight scale fontconfig uses an unusual scale from 0-215 for the font weight. It looks like it is somewhat derived from the typographic scale some font families use, but is still rather nonstandard. Nowadays the TrueType scale from 100-900 seems to be standard. CSS uses it, for example. However, most importantly, VSFilter also uses the TrueType scale. So let's use it in libass, too. --- libass/ass_parse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libass/ass_parse.c') diff --git a/libass/ass_parse.c b/libass/ass_parse.c index 3d94615..9aebf3b 100644 --- a/libass/ass_parse.c +++ b/libass/ass_parse.c @@ -113,10 +113,10 @@ void update_font(ASS_Renderer *render_priv) val = render_priv->state.bold; // 0 = normal, 1 = bold, >1 = exact weight - if (val == 1) - val = 200; // bold + if (val == 1 || val == -1) + val = 700; // bold else if (val <= 0) - val = 80; // normal + val = 400; // normal desc.bold = val; val = render_priv->state.italic; -- cgit v1.2.3