From: wm4 Date: Fri, 28 Aug 2015 15:39:08 +0000 (+0200) Subject: font: fix broken charmap fallback handling X-Git-Tag: 0.13.0~28^2~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=102e28d6b7fc54b71fe223f4acf7cbdd373b5c02;p=libass font: fix broken charmap fallback handling An earlier commit added this code to avoid adding font faces multiple times. In this form, it breaks the "Trying all charmaps" fallback case, which can lead to text being rendered as boxes. Return the font that is going to contain the missing glyph instead. The calling code will check again, and run the fallback if necessary. --- diff --git a/libass/ass_font.c b/libass/ass_font.c index 9a81dca..0ba79ad 100644 --- a/libass/ass_font.c +++ b/libass/ass_font.c @@ -154,7 +154,7 @@ static int add_face(ASS_FontSelector *fontsel, ASS_Font *font, uint32_t ch) ass_msg(font->library, MSGL_INFO, "Got a font face that already is available! Skipping."); free(path); - return -1; + return i; } }