[Mplayer-cvslog] CVS: main/libvo font_load_ft.c,1.1,1.2

Zoltan Ponekker pontscho at mplayerhq.hu
Thu Aug 29 19:16:37 CEST 2002


Update of /cvsroot/mplayer/main/libvo
In directory mail:/var/tmp.root/cvs-serv20815/libvo

Modified Files:
	font_load_ft.c 
Log Message:


- add freetype support for gui
- fix some small bug


Index: font_load_ft.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/font_load_ft.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- font_load_ft.c	28 Aug 2002 20:52:02 -0000	1.1
+++ font_load_ft.c	29 Aug 2002 17:16:34 -0000	1.2
@@ -856,21 +856,16 @@
 
 static int load_sub_face(char *name, FT_Face *face)
 {
-    int err;
+    int err = -1;
     
-    if (name) {
-	err = FT_New_Face(library, name, 0, face);
-    } else {
-	err = 1;
-    }
+    if (name) err = FT_New_Face(library, name, 0, face);
 
     if (err) {
 	err = FT_New_Face(library, get_path("subfont.ttf"), 0, face);
 	if (err) {
 	    err = FT_New_Face(library, DATADIR"/subfont.ttf", 0, face);
 	    if (err) {
-		mp_msg(MSGT_OSD, MSGL_ERR, "New_Face failed. Maybe the font path is wrong.\n");
-		mp_msg(MSGT_OSD, MSGL_ERR, "Please supply the text font file (~/.mplayer/subfont.ttf).\n");
+	        mp_msg(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;
 	    }
 	}
@@ -880,10 +875,7 @@
 
 static int load_osd_face(FT_Face *face)
 {
-    int err;
-    
-    err = FT_New_Memory_Face(library, osd_font_pfb, sizeof(osd_font_pfb), 0, face);
-    if (err) {
+    if ( FT_New_Memory_Face(library, osd_font_pfb, sizeof(osd_font_pfb), 0, face) ) {
 	mp_msg(MSGT_OSD, MSGL_ERR, "New_Memory_Face failed..\n");
 	return -1;
     }
@@ -966,7 +958,7 @@
     /* generate the subtitle font */
     err = load_sub_face(fname, &face);
     if (err) {
-	mp_msg(MSGT_OSD, MSGL_ERR, "subtitle font: load_sub_face failed.\n");
+	mp_msg(MSGT_OSD, MSGL_WARN, "subtitle font: load_sub_face failed.\n");
 	goto gen_osd;
     }
 




More information about the MPlayer-cvslog mailing list