summaryrefslogtreecommitdiffstats
path: root/libvo/font_load_ft.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvo/font_load_ft.c')
-rw-r--r--libvo/font_load_ft.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/libvo/font_load_ft.c b/libvo/font_load_ft.c
index ddaf598069..f44c2c5796 100644
--- a/libvo/font_load_ft.c
+++ b/libvo/font_load_ft.c
@@ -84,13 +84,13 @@ static FT_Library library;
#define OSD_CHARSET_SIZE 15
-static FT_ULong osd_charset[OSD_CHARSET_SIZE] =
+static const FT_ULong osd_charset[OSD_CHARSET_SIZE] =
{
0xe001, 0xe002, 0xe003, 0xe004, 0xe005, 0xe006, 0xe007, 0xe008,
0xe009, 0xe00a, 0xe00b, 0xe010, 0xe011, 0xe012, 0xe013
};
-static FT_ULong osd_charcodes[OSD_CHARSET_SIZE] =
+static const FT_ULong osd_charcodes[OSD_CHARSET_SIZE] =
{
0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,
0x09,0x0a,0x0b,0x10,0x11,0x12,0x13
@@ -920,7 +920,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;
}
}
@@ -931,7 +931,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;
@@ -1018,7 +1018,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++;
@@ -1035,7 +1035,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
@@ -1049,7 +1049,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;
}
@@ -1067,14 +1067,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;
}
@@ -1129,7 +1129,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;
}