diff options
Diffstat (limited to 'libvo/font_load_ft.c')
-rw-r--r-- | libvo/font_load_ft.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/libvo/font_load_ft.c b/libvo/font_load_ft.c index 87249f5962..1cd6fb5733 100644 --- a/libvo/font_load_ft.c +++ b/libvo/font_load_ft.c @@ -46,7 +46,6 @@ #include "mpbswap.h" #include "font_load.h" #include "mp_msg.h" -#include "help_mp.h" #include "mplayer.h" #include "path.h" #include "osd_font.h" @@ -902,7 +901,7 @@ static int load_sub_face(const char *name, int face_index, FT_Face *face) if (err) { err = FT_New_Face(library, MPLAYER_DATADIR "/subfont.ttf", 0, face); if (err) { - mp_msg(MSGT_OSD, MSGL_ERR, MSGTR_LIBVO_FONT_LOAD_FT_NewFaceFailed); + mp_tmsg(MSGT_OSD, MSGL_ERR, "New_Face failed. Maybe the font path is wrong.\nPlease supply the text font file (~/.mplayer/subfont.ttf).\n"); return -1; } } @@ -913,7 +912,7 @@ static int load_sub_face(const char *name, int face_index, FT_Face *face) static int load_osd_face(FT_Face *face) { if ( FT_New_Memory_Face(library, osd_font_pfb, sizeof(osd_font_pfb), 0, face) ) { - mp_msg(MSGT_OSD, MSGL_ERR, MSGTR_LIBVO_FONT_LOAD_FT_NewMemoryFaceFailed); + mp_tmsg(MSGT_OSD, MSGL_ERR, "New_Memory_Face failed..\n"); return -1; } return 0; @@ -1000,7 +999,7 @@ font_desc_t* read_font_desc_ft(const char *fname, int face_index, int movie_widt /* generate the subtitle font */ err = load_sub_face(fname, face_index, &face); if (err) { - mp_msg(MSGT_OSD, MSGL_WARN, MSGTR_LIBVO_FONT_LOAD_FT_SubFaceFailed); + mp_tmsg(MSGT_OSD, MSGL_WARN, "subtitle font: load_sub_face failed.\n"); goto gen_osd; } desc->face_cnt++; @@ -1017,7 +1016,7 @@ font_desc_t* read_font_desc_ft(const char *fname, int face_index, int movie_widt } if (charset_size < 0) { - mp_msg(MSGT_OSD, MSGL_ERR, MSGTR_LIBVO_FONT_LOAD_FT_SubFontCharsetFailed); + mp_tmsg(MSGT_OSD, MSGL_ERR, "subtitle font: prepare_charset failed.\n"); goto err_out; } #else @@ -1031,7 +1030,7 @@ font_desc_t* read_font_desc_ft(const char *fname, int face_index, int movie_widt subtitle_font_thickness, subtitle_font_radius); if (err) { - mp_msg(MSGT_OSD, MSGL_ERR, MSGTR_LIBVO_FONT_LOAD_FT_CannotPrepareSubtitleFont); + mp_tmsg(MSGT_OSD, MSGL_ERR, "Cannot prepare subtitle font.\n"); goto err_out; } @@ -1049,14 +1048,14 @@ gen_osd: subtitle_font_thickness, subtitle_font_radius); if (err) { - mp_msg(MSGT_OSD, MSGL_ERR, MSGTR_LIBVO_FONT_LOAD_FT_CannotPrepareOSDFont); + mp_tmsg(MSGT_OSD, MSGL_ERR, "Cannot prepare OSD font.\n"); goto err_out; } err = generate_tables(desc, subtitle_font_thickness, subtitle_font_radius); if (err) { - mp_msg(MSGT_OSD, MSGL_ERR, MSGTR_LIBVO_FONT_LOAD_FT_CannotGenerateTables); + mp_tmsg(MSGT_OSD, MSGL_ERR, "Cannot generate tables.\n"); goto err_out; } @@ -1111,7 +1110,7 @@ int done_freetype(void) err = FT_Done_FreeType(library); if (err) { - mp_msg(MSGT_OSD, MSGL_ERR, MSGTR_LIBVO_FONT_LOAD_FT_DoneFreeTypeFailed); + mp_tmsg(MSGT_OSD, MSGL_ERR, "FT_Done_FreeType failed.\n"); return -1; } @@ -1165,8 +1164,8 @@ void load_font_ft(int width, int height, font_desc_t** fontp, const char *font_n FcPatternDestroy(fc_pattern); return; } - // Failed to match any font, try without fontconfig - mp_msg(MSGT_OSD, MSGL_ERR, MSGTR_LIBVO_FONT_LOAD_FT_FontconfigNoMatch); + mp_tmsg(MSGT_OSD, MSGL_ERR, "Fontconfig failed to select a font. " + "Trying without fontconfig...\n"); } #endif *fontp=read_font_desc_ft(font_name, 0, width, height, font_scale_factor); |