summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodger Combs <rodger.combs@gmail.com>2018-10-12 00:35:18 -0500
committerOleg Oshmyan <chortos@inbox.lv>2019-09-26 16:48:42 +0300
commit6591a60a3d720f576352f8b4ef08362673d35cd0 (patch)
treeb2c20d4b3d0f10207d3405f682f06caf6f00063c
parentac75f67697845efc1b0a15693c96dcc9e0f71518 (diff)
downloadlibass-6591a60a3d720f576352f8b4ef08362673d35cd0.tar.bz2
libass-6591a60a3d720f576352f8b4ef08362673d35cd0.tar.xz
fontselect: load actual weight instead of a guess, when possible
-rw-r--r--libass/ass_fontselect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libass/ass_fontselect.c b/libass/ass_fontselect.c
index 87815b3..85ff0dc 100644
--- a/libass/ass_fontselect.c
+++ b/libass/ass_fontselect.c
@@ -810,7 +810,7 @@ get_font_info(FT_Library lib, FT_Face face, ASS_FontProviderMetaData *info)
// calculate sensible slant and weight from style attributes
slant = 110 * !!(face->style_flags & FT_STYLE_FLAG_ITALIC);
- weight = 300 * !!(face->style_flags & FT_STYLE_FLAG_BOLD) + 400;
+ weight = ass_face_get_weight(face);
// fill our struct
info->slant = slant;