diff options
author | Rodger Combs <rodger.combs@gmail.com> | 2018-10-12 00:33:37 -0500 |
---|---|---|
committer | Oleg Oshmyan <chortos@inbox.lv> | 2019-09-26 16:48:42 +0300 |
commit | ac75f67697845efc1b0a15693c96dcc9e0f71518 (patch) | |
tree | 5db1a539c4dd37276315ad28859208828d9cb8be | |
parent | 6d98071cf6c5dbd48660ff8799b1000837600b0e (diff) | |
download | libass-ac75f67697845efc1b0a15693c96dcc9e0f71518.tar.bz2 libass-ac75f67697845efc1b0a15693c96dcc9e0f71518.tar.xz |
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
-rw-r--r-- | libass/ass_font.c | 3 |
1 files changed, 1 insertions, 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); |