diff options
author | Grigori Goronzy <greg@chown.ath.cx> | 2011-08-19 01:16:24 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@chown.ath.cx> | 2015-07-10 10:42:40 +0200 |
commit | 93c4e8ebf3dea5c9e1978f78a33cb961d6a1aaf7 (patch) | |
tree | 10adc9f34146192dafdf6ab158f4022ed2acff3f /libass/ass_parse.c | |
parent | 986605e29d9d8c7a0d0aeac8f53fc556097334d6 (diff) | |
download | libass-93c4e8ebf3dea5c9e1978f78a33cb961d6a1aaf7.tar.bz2 libass-93c4e8ebf3dea5c9e1978f78a33cb961d6a1aaf7.tar.xz |
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.
Diffstat (limited to 'libass/ass_parse.c')
-rw-r--r-- | libass/ass_parse.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |