diff options
author | wm4 <wm4@mplayer2.org> | 2012-07-28 22:00:31 +0200 |
---|---|---|
committer | wm4 <wm4@mplayer2.org> | 2012-07-28 23:36:08 +0200 |
commit | 85a3a0d5bc1294f88dea42a515bb3dce16c9d951 (patch) | |
tree | 628ad08270d2552795bc6c708d5ce53fc97fb069 /sub/ass_mp.c | |
parent | 74e7a1e937c10d9f4d8ce9b0ba4edee52044a757 (diff) | |
download | mpv-85a3a0d5bc1294f88dea42a515bb3dce16c9d951.tar.bz2 mpv-85a3a0d5bc1294f88dea42a515bb3dce16c9d951.tar.xz |
osd: remove freetype font rendering code
The previous commit made libass the default OSD renderer. This commit
removes the disabled freetype renderer completely. The commits were
done separately to make rolling back easier, because using libass for
OSD rendering is a risky choice.
Also remove freetype/fontconfig/fribidi code. This is all done by
libass now.
If mplayer is compiled without libass, no OSD is displayed.
Diffstat (limited to 'sub/ass_mp.c')
-rw-r--r-- | sub/ass_mp.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/sub/ass_mp.c b/sub/ass_mp.c index 3dd743776d..1510e43ab5 100644 --- a/sub/ass_mp.c +++ b/sub/ass_mp.c @@ -60,10 +60,8 @@ ASS_Track *mp_ass_default_track(ASS_Library *library, struct MPOpts *opts) track->default_style = sid; ASS_Style *style = track->styles + sid; style->Name = strdup("Default"); - style->FontName = (font_fontconfig >= 0 - && sub_font_name) ? strdup(sub_font_name) - : (font_fontconfig >= 0 - && font_name) ? strdup(font_name) : strdup("Sans"); + style->FontName = sub_font_name ? strdup(sub_font_name) + : font_name ? strdup(font_name) : strdup("Sans"); style->treat_fontname_as_pattern = 1; double fs = track->PlayResY * text_font_scale_factor / 100.; @@ -250,25 +248,19 @@ void mp_ass_configure_fonts(ASS_Renderer *priv) { char *dir, *path, *family; dir = get_path("fonts"); - if (font_fontconfig < 0 && sub_font_name) - path = strdup(sub_font_name); - else if (font_fontconfig < 0 && font_name) - path = strdup(font_name); - else { - path = get_path("subfont.ttf"); - if (!mp_path_exists(path)) { - free(path); - path = NULL; - } + path = get_path("subfont.ttf"); + if (!mp_path_exists(path)) { + free(path); + path = NULL; } - if (font_fontconfig >= 0 && sub_font_name) + if (sub_font_name) family = strdup(sub_font_name); - else if (font_fontconfig >= 0 && font_name) + else if (font_name) family = strdup(font_name); else family = 0; - ass_set_fonts(priv, path, family, font_fontconfig + 1, NULL, 1); + ass_set_fonts(priv, path, family, 1, NULL, 1); free(dir); free(path); |