From 102e28d6b7fc54b71fe223f4acf7cbdd373b5c02 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 28 Aug 2015 17:39:08 +0200 Subject: 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. --- libass/ass_font.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } } -- cgit v1.2.3