From ac75f67697845efc1b0a15693c96dcc9e0f71518 Mon Sep 17 00:00:00 2001 From: Rodger Combs Date: Fri, 12 Oct 2018 00:33:37 -0500 Subject: font: don't faux-bold fonts that are already bold enough And conversely, do faux-bold fonts that are too thin The offset of 150 matches VSFilter's behavior --- libass/ass_font.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libass/ass_font.c b/libass/ass_font.c index d2fd76d..d17b128 100644 --- a/libass/ass_font.c +++ b/libass/ass_font.c @@ -557,8 +557,7 @@ FT_Glyph ass_font_get_glyph(ASS_Font *font, int face_index, int index, FT_GlyphSlot_Oblique(face->glyph); } - if (!(face->style_flags & FT_STYLE_FLAG_BOLD) && - (font->desc.bold > 400)) { + if (font->desc.bold > ass_face_get_weight(face) + 150) { ass_glyph_embolden(face->glyph); } error = FT_Get_Glyph(face->glyph, &glyph); -- cgit v1.2.3