diff options
author | Grigori Goronzy <greg@chown.ath.cx> | 2015-09-01 01:17:53 +0200 |
---|---|---|
committer | Grigori Goronzy <greg@chown.ath.cx> | 2015-09-01 14:34:21 +0200 |
commit | 2a45128601458dd6ec9df90d2825a1ba7a9cc176 (patch) | |
tree | 300152e01b992e89a39bd1bfd7bf51f957b26775 | |
parent | 2534bb10985170b434100cb0d7317e6c276e0d22 (diff) | |
download | libass-2a45128601458dd6ec9df90d2825a1ba7a9cc176.tar.bz2 libass-2a45128601458dd6ec9df90d2825a1ba7a9cc176.tar.xz |
fontselect: remove static fallback font list
The default font provider needs to provide a GetFallbackFunc callback
instead.
-rw-r--r-- | libass/ass_fontselect.c | 26 |
1 files changed, 0 insertions, 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, |