From: Rodger Combs Date: Fri, 12 Oct 2018 05:35:18 +0000 (-0500) Subject: fontselect: load actual weight instead of a guess, when possible X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6591a60a3d720f576352f8b4ef08362673d35cd0;p=libass fontselect: load actual weight instead of a guess, when possible --- 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;