From 2a45128601458dd6ec9df90d2825a1ba7a9cc176 Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Tue, 1 Sep 2015 01:17:53 +0200 Subject: fontselect: remove static fallback font list The default font provider needs to provide a GetFallbackFunc callback instead. --- libass/ass_fontselect.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/libass/ass_fontselect.c b/libass/ass_fontselect.c index 586edf3..c2686bd 100644 --- a/libass/ass_fontselect.c +++ b/libass/ass_fontselect.c @@ -49,16 +49,6 @@ #define ABS(x) ((x) < 0 ? -(x) : (x)) #define MAX_FULLNAME 100 -static const char *fallback_fonts[] = { - // generic latin sans-serif fonts - "Arial", - "DejaVu Sans", - // fonts with lots of coverage - "Arial Unicode MS", - "FreeSerif", - NULL -}; - // internal font database element // all strings are utf-8 struct font_info { @@ -657,22 +647,6 @@ char *ass_font_select(ASS_FontSelector *priv, ASS_Library *library, priv->path_default, *index, *postscript_name); } - if (!res) { - // This code path is reached when the script uses glyphs not - // available in the previous fonts (or no font is matched), and - // the ASS_FontProvider used provides only the MatchFontsFunc callback - // and no GetFallbackFunc callback. As a last resort, try a builtin - // list of fallback families. - for (int i = 0; fallback_fonts[i] && !res; i++) { - res = select_font(priv, library, fallback_fonts[i], bold, - italic, index, postscript_name, uid, data, code); - if (res) - ass_msg(library, MSGL_WARN, "fontselect: Using fallback " - "font family: (%s, %d, %d) -> %s, %d, %s", - family, bold, italic, res, *index, *postscript_name); - } - } - if (res) ass_msg(library, MSGL_V, "fontselect: (%s, %d, %d) -> %s, %d, %s", family, bold, -- cgit v1.2.3