changeset 7139:dd1e21e775b6

- add freetype support for gui - fix some small bug
author pontscho
date Thu, 29 Aug 2002 17:16:34 +0000
parents 8ab4d11353ae
children b9ce54c7f30f
files Gui/cfg.c Gui/interface.c Gui/interface.h Gui/mplayer/gtk/fs.c Gui/mplayer/gtk/opts.c help_mp-en.h help_mp-hu.h libvo/font_load_ft.c
diffstat 8 files changed, 421 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/cfg.c	Thu Aug 29 13:04:01 2002 +0000
+++ b/Gui/cfg.c	Thu Aug 29 17:16:34 2002 +0000
@@ -56,7 +56,7 @@
  { "vo_direct_render",&vo_directrendering,CONF_TYPE_FLAG,0,0,1,NULL },
 
  { "v_framedrop",&frame_dropping,CONF_TYPE_INT,CONF_RANGE,0,2,NULL },
- { "v_flip",&flip,CONF_TYPE_FLAG,0,0,1,NULL },
+ { "v_flip",&flip,CONF_TYPE_INT,CONF_RANGE,-1,1,NULL },
  { "v_ni",&force_ni,CONF_TYPE_FLAG,0,0,1,NULL },
  { "v_idx",&index_mode,CONF_TYPE_INT,CONF_RANGE,-1,2,NULL },
  { "v_vfm",&video_family,CONF_TYPE_INT,CONF_RANGE,-1,10,NULL },
@@ -82,6 +82,12 @@
  { "sub_pos",&sub_pos,CONF_TYPE_INT,CONF_RANGE,0,200,NULL },
  { "font_factor",&font_factor,CONF_TYPE_FLOAT,CONF_RANGE,0.0,10.0,NULL },
  { "font_name",&font_name,CONF_TYPE_STRING,0,0,0,NULL },
+ { "font_encoding",&subtitle_font_encoding,CONF_TYPE_STRING,0,0,0,NULL },
+ { "font_text_scale",&text_font_scale_factor,CONF_TYPE_FLOAT,CONF_RANGE,0,100,NULL },
+ { "font_osd_scale",&osd_font_scale_factor,CONF_TYPE_FLOAT,CONF_RANGE,0,100,NULL },
+ { "font_blur",&subtitle_font_thickness,CONF_TYPE_FLOAT,CONF_RANGE,0,8,NULL },
+ { "font_outline",&subtitle_font_thickness,CONF_TYPE_FLOAT,CONF_RANGE,0,8,NULL },
+ { "font_autoscale",&subtitle_autoscale,CONF_TYPE_INT,CONF_RANGE,0,3,NULL },
  
  { "gui_skin",&skinName,CONF_TYPE_STRING,0,0,0,NULL },
 
--- a/Gui/interface.c	Thu Aug 29 13:04:01 2002 +0000
+++ b/Gui/interface.c	Thu Aug 29 17:16:34 2002 +0000
@@ -672,10 +672,38 @@
         sub_pos=(int)fparam;
         return NULL;   
 #if defined( USE_OSD ) || defined( USE_SUB )
+#ifndef HAVE_FREETYPE
    case gtkSetFontFactor:
         font_factor=fparam;
 	guiLoadFont();
 	return NULL;
+#else
+   case gtkSetFontOutLine:
+        subtitle_font_thickness=( 8.0f / 100.0f ) * fparam;
+	guiLoadFont();
+	return NULL;
+   case gtkSetFontBlur:
+	subtitle_font_radius=( 8.0f / 100.0f ) * fparam;
+	guiLoadFont();
+	return NULL;
+   case gtkSetFontTextScale:
+	text_font_scale_factor=fparam;
+	guiLoadFont();
+	return NULL;
+   case gtkSetFontOSDScale:
+	osd_font_scale_factor=fparam;
+	guiLoadFont();
+	return NULL;
+   case gtkSetFontEncoding:
+        if ( subtitle_font_encoding ) free( subtitle_font_encoding );
+	subtitle_font_encoding=gstrdup( (char *)vparam );
+	guiLoadFont();
+	return NULL;
+   case gtkSetFontAutoScale:
+	subtitle_autoscale=(int)fparam;
+	guiLoadFont();
+	return NULL;
+#endif
 #endif
 // --- misc
    case gtkClearStruct:
--- a/Gui/interface.h	Thu Aug 29 13:04:01 2002 +0000
+++ b/Gui/interface.h	Thu Aug 29 17:16:34 2002 +0000
@@ -5,6 +5,7 @@
 #include "../config.h"
 #include "mplayer/play.h"
 #include "../mplayer.h"
+#include "../libvo/font_load.h"
 #include "cfg.h"
 
 #ifdef USE_DVDREAD
@@ -177,6 +178,12 @@
 #define gtkSetAutoq       18
 #define gtkClearStruct    19
 #define gtkAddURLItem     20
+#define gtkSetFontOutLine 21
+#define gtkSetFontBlur    22
+#define gtkSetFontTextScale 23
+#define gtkSetFontOSDScale  24
+#define gtkSetFontEncoding  25
+#define gtkSetFontAutoScale 26
 
 extern float gtkEquChannels[6][10];
 
--- a/Gui/mplayer/gtk/fs.c	Thu Aug 29 13:04:01 2002 +0000
+++ b/Gui/mplayer/gtk/fs.c	Thu Aug 29 17:16:34 2002 +0000
@@ -79,7 +79,11 @@
 
 #define fsNumberOfFontFilterNames 1
 char * fsFontFileNames[fsNumberOfFontFilterNames+1][2] =
+#ifdef HAVE_FREETYPE
+	 { { "font files (*.ttf)",					   "*.ttf" },
+#else
 	 { { "font files (*.desc)",					   "*.desc" },
+#endif
 	   { "All files ( * )",						   "*" } };
 
 GtkWidget   * fsFileNamesList;
--- a/Gui/mplayer/gtk/opts.c	Thu Aug 29 13:04:01 2002 +0000
+++ b/Gui/mplayer/gtk/opts.c	Thu Aug 29 17:16:34 2002 +0000
@@ -63,24 +63,69 @@
 static GtkWidget * HSSubDelay;
 static GtkWidget * HSSubPosition;
 static GtkWidget * HSSubFPS;
-static GtkWidget * HSFontFactor;
 static GtkWidget * HSPPQuality;
 
 static GtkAdjustment * HSExtraStereoMuladj, * HSAudioDelayadj, * HSPanscanadj, * HSSubDelayadj;
-static GtkAdjustment * HSSubPositionadj, * HSSubFPSadj, * HSFontFactoradj, * HSPPQualityadj;
+static GtkAdjustment * HSSubPositionadj, * HSSubFPSadj, * HSPPQualityadj;
+
+#ifndef HAVE_FREETYPE
+static GtkWidget     * HSFontFactor;
+static GtkAdjustment * HSFontFactoradj;
+#else
+static GtkWidget     * HSFontBlur, * HSFontOutLine, * HSFontTextScale, * HSFontOSDScale;
+static GtkAdjustment * HSFontBluradj, * HSFontOutLineadj, * HSFontTextScaleadj, * HSFontOSDScaleadj;
+static GtkWidget     * CBFontEncoding, * EFontEncoding;
+static GtkWidget     * RBFontNoAutoScale, * BRFontAutoScaleWidth, * RBFontAutoScaleHeight, * RBFontAutoScaleDiagonal;
+//static GtkWidget     * AutoScale;
+#endif
 
 static struct
 {
  int    vfm;
  char * name;
 } lVFM[] =
-{ { -1,MSGTR_PREFERENCES_None   },
+ { 
+  { -1,MSGTR_PREFERENCES_None   },
   {  2,MSGTR_PREFERENCES_Codec1 },
   {  3,MSGTR_PREFERENCES_Codec2 },
   {  4,MSGTR_PREFERENCES_Codec3 },
   {  5,MSGTR_PREFERENCES_Codec4 },
   {  7,MSGTR_PREFERENCES_Codec5 },
-  { 10,MSGTR_PREFERENCES_Codec6 } };
+  { 10,MSGTR_PREFERENCES_Codec6 },
+  { 0,NULL }
+ };
+
+#ifdef HAVE_FREETYPE
+static struct 
+{
+ char * name;
+ char * comment;
+} lEncoding[] =
+ {
+  { "unicode",     MSGTR_PREFERENCES_FontEncoding1 },
+  { "iso-8859-1",  MSGTR_PREFERENCES_FontEncoding2 },
+  { "iso-8859-15", MSGTR_PREFERENCES_FontEncoding3 },
+  { "iso-8859-2",  MSGTR_PREFERENCES_FontEncoding4 },
+  { "iso-8859-3",  MSGTR_PREFERENCES_FontEncoding5 },
+  { "iso-8859-4",  MSGTR_PREFERENCES_FontEncoding6 },
+  { "iso-8859-5",  MSGTR_PREFERENCES_FontEncoding7 },
+  { "iso-8859-6",  MSGTR_PREFERENCES_FontEncoding8 },
+  { "iso-8859-7",  MSGTR_PREFERENCES_FontEncoding9 },
+  { "iso-8859-9",  MSGTR_PREFERENCES_FontEncoding10 },
+  { "iso-8859-13", MSGTR_PREFERENCES_FontEncoding11 },
+  { "iso-8859-14", MSGTR_PREFERENCES_FontEncoding12 },
+  { "iso-8859-8",  MSGTR_PREFERENCES_FontEncoding13 },
+  { "koi8-r",      MSGTR_PREFERENCES_FontEncoding14 },
+  { "koi8-u/ru",   MSGTR_PREFERENCES_FontEncoding15 },
+  { "cp936",       MSGTR_PREFERENCES_FontEncoding16 },
+  { "big5",        MSGTR_PREFERENCES_FontEncoding17 },
+  { "shift-jis",   MSGTR_PREFERENCES_FontEncoding18 },
+  { "cp949",       MSGTR_PREFERENCES_FontEncoding19 },
+  { "cp874",       MSGTR_PREFERENCES_FontEncoding20 },
+  { NULL,NULL } 
+ };
+char * lCEncoding = NULL;
+#endif
 	    
        int    gtkVPreferences = 0;
 static int    old_audio_driver = 0;
@@ -99,6 +144,9 @@
 static gboolean prHScaler( GtkWidget * widget,GdkEventMotion  * event,gpointer user_data );
 static void prToggled( GtkToggleButton * togglebutton,gpointer user_data );
 static void prCListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data );
+#ifdef HAVE_FREETYPE
+static void prEntry( GtkContainer * container,GtkWidget * widget,gpointer user_data );
+#endif
 
 extern int    muted;
 
@@ -177,7 +225,6 @@
  gtk_adjustment_set_value( HSSubDelayadj,sub_delay );
  gtk_adjustment_set_value( HSSubFPSadj,sub_fps );
  gtk_adjustment_set_value( HSSubPositionadj,sub_pos );
- gtk_adjustment_set_value( HSFontFactoradj,font_factor );
  switch ( osd_level )
   {
    case 0: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBOSDNone ),TRUE ); break;
@@ -187,7 +234,31 @@
 #if 0
  if ( guiIntfStruct.Subtitlename ) gtk_entry_set_text( GTK_ENTRY( ESubtitleName ),guiIntfStruct.Subtitlename );
 #endif
+ // font ...
  if ( font_name ) gtk_entry_set_text( GTK_ENTRY( prEFontName ),font_name );
+#ifndef HAVE_FREETYPE
+ gtk_adjustment_set_value( HSFontFactoradj,font_factor );
+#else
+ gtk_adjustment_set_value( HSFontBluradj,subtitle_font_radius );
+ gtk_adjustment_set_value( HSFontOutLineadj,subtitle_font_thickness );
+ gtk_adjustment_set_value( HSFontTextScaleadj,text_font_scale_factor );
+ gtk_adjustment_set_value( HSFontOSDScaleadj,osd_font_scale_factor );
+ if ( subtitle_font_encoding )
+  {
+   int i;
+   for ( i=0;lEncoding[i].name;i++ ) 
+    if ( !gstrcmp( subtitle_font_encoding,lEncoding[i].name ) ) break;
+   if ( lEncoding[i].name ) lCEncoding=lEncoding[i].comment;
+   gtk_entry_set_text( GTK_ENTRY( EFontEncoding ),lCEncoding );
+  }
+ switch ( subtitle_autoscale )
+  {
+   case 0: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBFontNoAutoScale ),TRUE ); break;
+   case 1: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( BRFontAutoScaleWidth ),TRUE ); break;
+   case 2: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleHeight ),TRUE ); break;
+   case 3: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleDiagonal ),TRUE ); break;
+  }
+#endif
 
 // -- 4. page
  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNonInterlaved ),force_ni );
@@ -230,13 +301,27 @@
  gtk_signal_connect( GTK_OBJECT( CBNormalize ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)1 );
  gtk_signal_connect( GTK_OBJECT( CBAudioEqualizer ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)2 );
  gtk_signal_connect( GTK_OBJECT( CBNoSound ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)3 );
+#ifdef HAVE_FREETYPE
+ gtk_signal_connect( GTK_OBJECT( RBFontNoAutoScale ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)4 );
+ gtk_signal_connect( GTK_OBJECT( BRFontAutoScaleWidth ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)5 );
+ gtk_signal_connect( GTK_OBJECT( RBFontAutoScaleHeight ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)6 );
+ gtk_signal_connect( GTK_OBJECT( RBFontAutoScaleDiagonal ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)7 );
+#endif
 
  gtk_signal_connect( GTK_OBJECT( HSExtraStereoMul ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)0 );
  gtk_signal_connect( GTK_OBJECT( HSAudioDelay ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)1 );
  gtk_signal_connect( GTK_OBJECT( HSPanscan ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)2 );
  gtk_signal_connect( GTK_OBJECT( HSSubDelay ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)3 );
  gtk_signal_connect( GTK_OBJECT( HSSubPosition ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)4 );
+#ifndef HAVE_FREETYPE
  gtk_signal_connect( GTK_OBJECT( HSFontFactor ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)5 );
+#else
+ gtk_signal_connect( GTK_OBJECT( HSFontBlur ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)6 );
+ gtk_signal_connect( GTK_OBJECT( HSFontOutLine ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)7 );
+ gtk_signal_connect( GTK_OBJECT( HSFontTextScale ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)8 );
+ gtk_signal_connect( GTK_OBJECT( HSFontOSDScale ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)9 );
+ gtk_signal_connect( GTK_OBJECT( EFontEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),NULL );
+#endif
  
  gtk_signal_connect( GTK_OBJECT( CLADrivers ),"select_row",GTK_SIGNAL_FUNC( prCListRow ),(void*)0 );
  gtk_signal_connect( GTK_OBJECT( CLVDrivers ),"select_row",GTK_SIGNAL_FUNC( prCListRow ),(void*)1 );
@@ -260,6 +345,19 @@
 #endif
 }
 
+#ifdef HAVE_FREETYPE
+static void prEntry( GtkContainer * container,GtkWidget * widget,gpointer user_data )
+{
+ char * comment = gtk_entry_get_text( GTK_ENTRY( EFontEncoding ) );
+ int    i;
+ 
+ for ( i=0;lEncoding[i].name;i++ )
+  if ( !gstrcmp( lEncoding[i].comment,comment ) ) break;
+  
+ if ( lEncoding[i].comment ) gtkSet( gtkSetFontEncoding,0,lEncoding[i].name );
+}
+#endif
+
 static void prDestroy( GtkObject * object,gpointer user_data )
 { HidePreferences(); }
 
@@ -308,11 +406,24 @@
 	gtkSet( gtkSetSubDelay,HSSubDelayadj->value,NULL );
 	gtkSet( gtkSetSubFPS,HSSubFPSadj->value,NULL );
 	gtkSet( gtkSetSubPos,HSSubPositionadj->value,NULL );
-	gtkSet( gtkSetFontFactor,HSFontFactoradj->value,NULL );
 	if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDNone ) ) ) osd_level=0;
 	if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDIndicator ) ) ) osd_level=1;
 	if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDTandP ) ) ) osd_level=2;
+
+        // font ...	
 	guiSetFilename( font_name,gtk_entry_get_text( GTK_ENTRY( prEFontName ) ) );
+#ifndef HAVE_FREETYPE
+	gtkSet( gtkSetFontFactor,HSFontFactoradj->value,NULL );
+#else
+	gtkSet( gtkSetFontBlur,HSFontBluradj->value,NULL );
+	gtkSet( gtkSetFontOutLine,HSFontOutLineadj->value,NULL );
+	gtkSet( gtkSetFontTextScale,HSFontTextScaleadj->value,NULL );
+	gtkSet( gtkSetFontOSDScale,HSFontOSDScaleadj->value,NULL );
+	if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontNoAutoScale ) ) ) gtkSet( gtkSetFontAutoScale,0,NULL );
+	if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( BRFontAutoScaleWidth ) ) ) gtkSet( gtkSetFontAutoScale,1,NULL );
+	if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleHeight ) ) ) gtkSet( gtkSetFontAutoScale,2,NULL );
+	if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleDiagonal ) ) ) gtkSet( gtkSetFontAutoScale,3,NULL );
+#endif
 
 	// -- 4. page
 	force_ni=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNonInterlaved ) );
@@ -374,8 +485,23 @@
         gtkSet( gtkSetSubPos,HSSubPositionadj->value,NULL );
 	break;
    case 5: // font factor
+#ifndef HAVE_FREETYPE
         gtkSet( gtkSetFontFactor,HSFontFactoradj->value,NULL );
 	break;
+#else
+   case 6: // font blur
+	gtkSet( gtkSetFontBlur,HSFontBluradj->value,NULL );
+        break;
+   case 7: // font outline
+        gtkSet( gtkSetFontOutLine,HSFontOutLineadj->value,NULL );
+        break;
+   case 8: // text scale
+        gtkSet( gtkSetFontTextScale,HSFontTextScaleadj->value,NULL );
+	break;
+   case 9: // osd scale
+        gtkSet( gtkSetFontOSDScale,HSFontOSDScaleadj->value,NULL );
+	break;
+#endif
   }
  return FALSE;
 }
@@ -395,6 +521,12 @@
    case 3: // no sound
         mixer_mute();
 	break;
+   case 4:
+   case 5:
+   case 6:
+   case 7:
+	gtkSet( gtkSetFontAutoScale,(float)((int)user_data - 4 ),NULL );
+	break;
   }
 }
 
@@ -454,7 +586,9 @@
   GtkWidget * frame5;
   GtkWidget * vbox600;
   GSList    * OSD_group = NULL;
+  GSList    * Font_group = NULL;
   GList	    * CBVFM_items = NULL;
+  GList     * CBFontEncoding_items = NULL;
   GtkWidget * frame6;
   GtkWidget * vbox7;
   GtkWidget * vbox8;
@@ -468,7 +602,9 @@
   GtkWidget * hbox6;
   GtkWidget * label15;
   GtkWidget * hbuttonbox5;
+#ifndef HAVE_FREETYPE
   GtkWidget * hbox7;
+#endif
   GtkWidget * label16;
   GtkWidget * label3;
   GtkWidget * vbox601;
@@ -487,7 +623,11 @@
   Preferences=gtk_window_new( GTK_WINDOW_DIALOG );
   gtk_widget_set_name( Preferences,"Preferences" );
   gtk_object_set_data( GTK_OBJECT( Preferences ),"Preferences",Preferences );
+#ifndef HAVE_FREETYPE
   gtk_widget_set_usize( Preferences,512,400 );
+#else
+  gtk_widget_set_usize( Preferences,612,565 );
+#endif
   gtk_window_set_title( GTK_WINDOW( Preferences ),MSGTR_Preferences );
   gtk_window_set_position( GTK_WINDOW( Preferences ),GTK_WIN_POS_CENTER );
   gtk_window_set_policy( GTK_WINDOW( Preferences ),FALSE,FALSE,FALSE );
@@ -1203,6 +1343,7 @@
   gtk_widget_show( BLoadFont );
   gtk_container_add( GTK_CONTAINER( hbuttonbox5 ),BLoadFont );
 
+#ifndef HAVE_FREETYPE
   hbox7=gtk_hbox_new( FALSE,0 );
   gtk_widget_set_name( hbox7,"hbox7" );
   gtk_widget_ref( hbox7 );
@@ -1228,8 +1369,157 @@
   gtk_box_pack_start( GTK_BOX( hbox7 ),HSFontFactor,TRUE,TRUE,0 );
   gtk_scale_set_value_pos( GTK_SCALE( HSFontFactor ),GTK_POS_RIGHT );
   gtk_scale_set_digits( GTK_SCALE( HSFontFactor ),2 );
+#else
 
-  label3=gtk_label_new( "Subtitle & OSD" );
+  
+//	static GtkWidget     * RBFontNoAutoScale, * BRFontAutoScaleWidth, * RBFontAutoScaleHeight, * RBFontAutoScaleDiagonal;
+
+  RBFontNoAutoScale=gtk_radio_button_new_with_label( Font_group,MSGTR_PREFERENCES_FontNoAutoScale );
+  Font_group=gtk_radio_button_group( GTK_RADIO_BUTTON( RBFontNoAutoScale ) );
+  gtk_widget_set_name( RBFontNoAutoScale,"RBFontNoAutoScale" );
+  gtk_widget_ref( RBFontNoAutoScale );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"RBFontNoAutoScale",RBFontNoAutoScale,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( RBFontNoAutoScale );
+  gtk_box_pack_start( GTK_BOX( vbox603 ),RBFontNoAutoScale,FALSE,FALSE,0 );
+
+  BRFontAutoScaleWidth=gtk_radio_button_new_with_label( Font_group,MSGTR_PREFERENCES_FontPropWidth );
+  Font_group=gtk_radio_button_group( GTK_RADIO_BUTTON( BRFontAutoScaleWidth ) );
+  gtk_widget_set_name( BRFontAutoScaleWidth,"BRFontAutoScaleWidth" );
+  gtk_widget_ref( BRFontAutoScaleWidth );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"BRFontAutoScaleWidth",BRFontAutoScaleWidth,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( BRFontAutoScaleWidth );
+  gtk_box_pack_start( GTK_BOX( vbox603 ),BRFontAutoScaleWidth,FALSE,FALSE,0 );
+
+  RBFontAutoScaleHeight=gtk_radio_button_new_with_label( Font_group,MSGTR_PREFERENCES_FontPropHeight );
+  Font_group=gtk_radio_button_group( GTK_RADIO_BUTTON( RBFontAutoScaleHeight ) );
+  gtk_widget_set_name( RBFontAutoScaleHeight,"RBFontAutoScaleHeight" );
+  gtk_widget_ref( RBFontAutoScaleHeight );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"RBFontAutoScaleHeight",RBFontAutoScaleHeight,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( RBFontAutoScaleHeight );
+  gtk_box_pack_start( GTK_BOX( vbox603 ),RBFontAutoScaleHeight,FALSE,FALSE,0 );
+
+  RBFontAutoScaleDiagonal=gtk_radio_button_new_with_label( Font_group,MSGTR_PREFERENCES_FontPropDiagonal );
+  Font_group=gtk_radio_button_group( GTK_RADIO_BUTTON( RBFontAutoScaleDiagonal ) );
+  gtk_widget_set_name( RBFontAutoScaleDiagonal,"RBFontAutoScaleDiagonal" );
+  gtk_widget_ref( RBFontAutoScaleDiagonal );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"RBFontAutoScaleDiagonal",RBFontAutoScaleDiagonal,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( RBFontAutoScaleDiagonal );
+  gtk_box_pack_start( GTK_BOX( vbox603 ),RBFontAutoScaleDiagonal,FALSE,FALSE,0 );
+
+  table1=gtk_table_new( 3,2,FALSE );
+  gtk_widget_set_name( table1,"table1" );
+  gtk_widget_ref( table1 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"table1",table1,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( table1 );
+  gtk_box_pack_start( GTK_BOX( vbox603 ),table1,FALSE,FALSE,0 );
+
+  label16=gtk_label_new( MSGTR_PREFERENCES_FontEncoding );
+  gtk_widget_set_name( label16,"label16" );
+  gtk_widget_ref( label16 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label16",label16,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label16 );
+  gtk_table_attach( GTK_TABLE( table1 ),label16,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
+  gtk_misc_set_alignment( GTK_MISC( label16 ),7.45058e-09,0.5 );
+  gtk_misc_set_padding( GTK_MISC( label16 ),4,0 );
+  
+  CBFontEncoding=gtk_combo_new();
+  gtk_widget_set_name( CBFontEncoding,"CBFontEncoding" );
+  gtk_widget_ref( CBFontEncoding );
+  gtk_widget_show( CBFontEncoding );
+  gtk_table_attach( GTK_TABLE( table1 ),CBFontEncoding,1,2,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
+  {
+   int i;
+   for ( i=0;lEncoding[i].name;i++ ) CBFontEncoding_items=g_list_append( CBFontEncoding_items,lEncoding[i].comment );
+  }
+  gtk_combo_set_popdown_strings( GTK_COMBO( CBFontEncoding ),CBFontEncoding_items );
+  g_list_free( CBFontEncoding_items );
+
+  EFontEncoding=GTK_COMBO( CBFontEncoding )->entry;
+  gtk_widget_set_name( EFontEncoding,"EFontEncoding" );
+  gtk_entry_set_editable( GTK_ENTRY( EFontEncoding ),FALSE );
+  gtk_widget_ref( EFontEncoding );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"EFontEncoding",EFontEncoding,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( EFontEncoding );
+
+  label16=gtk_label_new( MSGTR_PREFERENCES_FontBlur );
+  gtk_widget_set_name( label16,"label16" );
+  gtk_widget_ref( label16 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label16",label16,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label16 );
+  gtk_table_attach( GTK_TABLE( table1 ),label16,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
+  gtk_misc_set_alignment( GTK_MISC( label16 ),7.45058e-09,0.5 );
+  gtk_misc_set_padding( GTK_MISC( label16 ),4,0 );
+
+  HSFontBluradj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0.1,0,0 ) );
+  HSFontBlur=gtk_hscale_new( HSFontBluradj );
+  gtk_widget_set_name( HSFontBlur,"HSFontBlur" );
+  gtk_widget_ref( HSFontBlur );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"HSFontBlur",HSFontBlur,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( HSFontBlur );
+  gtk_table_attach( GTK_TABLE( table1 ),HSFontBlur,1,2,1,2,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
+  gtk_scale_set_value_pos( GTK_SCALE( HSFontBlur ),GTK_POS_RIGHT );
+  gtk_scale_set_digits( GTK_SCALE( HSFontBlur ),2 );
+
+  label16=gtk_label_new( MSGTR_PREFERENCES_FontOutLine );
+  gtk_widget_set_name( label16,"label16" );
+  gtk_widget_ref( label16 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label16",label16,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label16 );
+  gtk_table_attach( GTK_TABLE( table1 ),label16,0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
+  gtk_misc_set_alignment( GTK_MISC( label16 ),7.45058e-09,0.5 );
+  gtk_misc_set_padding( GTK_MISC( label16 ),4,0 );
+
+  HSFontOutLineadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0.1,0,0 ) );
+  HSFontOutLine=gtk_hscale_new( HSFontOutLineadj );
+  gtk_widget_set_name( HSFontOutLine,"HSFontOutLine" );
+  gtk_widget_ref( HSFontOutLine );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"HSFontOutLine",HSFontOutLine,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( HSFontOutLine );
+  gtk_table_attach( GTK_TABLE( table1 ),HSFontOutLine,1,2,2,3,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
+  gtk_scale_set_value_pos( GTK_SCALE( HSFontOutLine ),GTK_POS_RIGHT );
+  gtk_scale_set_digits( GTK_SCALE( HSFontOutLine ),2 );
+
+  label16=gtk_label_new( MSGTR_PREFERENCES_FontTextScale );
+  gtk_widget_set_name( label16,"label16" );
+  gtk_widget_ref( label16 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label16",label16,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label16 );
+  gtk_table_attach( GTK_TABLE( table1 ),label16,0,1,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
+  gtk_misc_set_alignment( GTK_MISC( label16 ),7.45058e-09,0.5 );
+  gtk_misc_set_padding( GTK_MISC( label16 ),4,0 );
+
+  HSFontTextScaleadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0.1,0,0 ) );
+  HSFontTextScale=gtk_hscale_new( HSFontTextScaleadj );
+  gtk_widget_set_name( HSFontTextScale,"HSFontTextScale" );
+  gtk_widget_ref( HSFontTextScale );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"HSFontTextScale",HSFontTextScale,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( HSFontTextScale );
+  gtk_table_attach( GTK_TABLE( table1 ),HSFontTextScale,1,2,3,4,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
+  gtk_scale_set_value_pos( GTK_SCALE( HSFontTextScale ),GTK_POS_RIGHT );
+  gtk_scale_set_digits( GTK_SCALE( HSFontTextScale ),2 );
+
+  label16=gtk_label_new( MSGTR_PREFERENCES_FontOSDScale );
+  gtk_widget_set_name( label16,"label16" );
+  gtk_widget_ref( label16 );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label16",label16,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( label16 );
+  gtk_table_attach( GTK_TABLE( table1 ),label16,0,1,4,5,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
+  gtk_misc_set_alignment( GTK_MISC( label16 ),7.45058e-09,0.5 );
+  gtk_misc_set_padding( GTK_MISC( label16 ),4,0 );
+
+  HSFontOSDScaleadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0.1,0,0 ) );
+  HSFontOSDScale=gtk_hscale_new( HSFontOSDScaleadj );
+  gtk_widget_set_name( HSFontOSDScale,"HSFontOSDScale" );
+  gtk_widget_ref( HSFontOSDScale );
+  gtk_object_set_data_full( GTK_OBJECT( Preferences ),"HSFontOSDScale",HSFontOSDScale,(GtkDestroyNotify)gtk_widget_unref );
+  gtk_widget_show( HSFontOSDScale );
+  gtk_table_attach( GTK_TABLE( table1 ),HSFontOSDScale,1,2,4,5,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
+  gtk_scale_set_value_pos( GTK_SCALE( HSFontOSDScale ),GTK_POS_RIGHT );
+  gtk_scale_set_digits( GTK_SCALE( HSFontOSDScale ),2 );
+
+#endif
+
+  label3=gtk_label_new( MSGTR_PREFERENCES_SubtitleOSD );
   gtk_widget_set_name( label3,"label3" );
   gtk_widget_ref( label3 );
   gtk_object_set_data_full( GTK_OBJECT( Preferences ),"label3",label3,(GtkDestroyNotify)gtk_widget_unref );
@@ -1361,7 +1651,7 @@
   gtk_box_pack_start( GTK_BOX( hbox5 ),CBVFM,TRUE,TRUE,0 );
   {
    int i;
-   for ( i=0;i<7;i++ ) CBVFM_items=g_list_append( CBVFM_items,lVFM[i].name );
+   for ( i=0;lVFM[i].name;i++ ) CBVFM_items=g_list_append( CBVFM_items,lVFM[i].name );
   }
   gtk_combo_set_popdown_strings( GTK_COMBO( CBVFM ),CBVFM_items );
   g_list_free( CBVFM_items );
--- a/help_mp-en.h	Thu Aug 29 13:04:01 2002 +0000
+++ b/help_mp-en.h	Thu Aug 29 17:16:34 2002 +0000
@@ -486,6 +486,36 @@
 #define MSGTR_PREFERENCES_DXR3_VENC "Video encoder:"
 #define MSGTR_PREFERENCES_DXR3_LAVC "Use LAVC (ffmpeg)"
 #define MSGTR_PREFERENCES_DXR3_FAME "Use FAME"
+#define MSGTR_PREFERENCES_FontEncoding1 "Unicode"
+#define MSGTR_PREFERENCES_FontEncoding2 "Western European Languages (ISO-8859-1)"
+#define MSGTR_PREFERENCES_FontEncoding3 "Western European Languages with Euro (ISO-8859-15)"
+#define MSGTR_PREFERENCES_FontEncoding4 "Slavic/Central European Languages (ISO-8859-2)"
+#define MSGTR_PREFERENCES_FontEncoding5 "Esperanto, Galician, Maltese, Turkish (ISO-8859-3)"
+#define MSGTR_PREFERENCES_FontEncoding6 "Old Baltic charset (ISO-8859-4)"
+#define MSGTR_PREFERENCES_FontEncoding7 "Cyrillic (ISO-8859-5)"
+#define MSGTR_PREFERENCES_FontEncoding8 "Arabic (ISO-8859-6)"
+#define MSGTR_PREFERENCES_FontEncoding9 "Modern Greek (ISO-8859-7)"
+#define MSGTR_PREFERENCES_FontEncoding10 "Turkish (ISO-8859-9)"
+#define MSGTR_PREFERENCES_FontEncoding11 "Baltic (ISO-8859-13)"
+#define MSGTR_PREFERENCES_FontEncoding12 "Celtic (ISO-8859-14)"
+#define MSGTR_PREFERENCES_FontEncoding13 "Hebrew charsets (ISO-8859-8)"
+#define MSGTR_PREFERENCES_FontEncoding14 "Russian (KOI8-R)"
+#define MSGTR_PREFERENCES_FontEncoding15 "Ukrainian, Belarusian (KOI8-U/RU)"
+#define MSGTR_PREFERENCES_FontEncoding16 "Simplified Chinese charset (CP936)"
+#define MSGTR_PREFERENCES_FontEncoding17 "Traditional Chinese charset (BIG5)"
+#define MSGTR_PREFERENCES_FontEncoding18 "Japanese charsets (SHIFT-JIS)"
+#define MSGTR_PREFERENCES_FontEncoding19 "Korean charset (CP949)"
+#define MSGTR_PREFERENCES_FontEncoding20 "Thai charset (CP874)"
+#define MSGTR_PREFERENCES_FontNoAutoScale "No autoscale"
+#define MSGTR_PREFERENCES_FontPropWidth "Proportional to movie width"
+#define MSGTR_PREFERENCES_FontPropHeight "Proportional to movie height"
+#define MSGTR_PREFERENCES_FontPropDiagonal "Proportional to movie diagonal"
+#define MSGTR_PREFERENCES_FontEncoding "Encoding:"
+#define MSGTR_PREFERENCES_FontBlur "Blur:"
+#define MSGTR_PREFERENCES_FontOutLine "Outline:"
+#define MSGTR_PREFERENCES_FontTextScale "Text scale:"
+#define MSGTR_PREFERENCES_FontOSDScale "OSD scale:"
+#define MSGTR_PREFERENCES_SubtitleOSD "Subtitle & OSD"
 
 // --- messagebox
 #define MSGTR_MSGBOX_LABEL_FatalError "fatal error ..."
--- a/help_mp-hu.h	Thu Aug 29 13:04:01 2002 +0000
+++ b/help_mp-hu.h	Thu Aug 29 17:16:34 2002 +0000
@@ -356,36 +356,69 @@
 #define MSGTR_PREFERENCES_VideoEqu "Video equalizer"
 #define MSGTR_PREFERENCES_DoubleBuffer "Dupla bufferelés"
 #define MSGTR_PREFERENCES_DirectRender "Direct rendering"
-#define MSGTR_PREFERENCES_FrameDrop "Képeldobás"
-#define MSGTR_PREFERENCES_HFrameDrop "Erőszakos képeldobó"
+#define MSGTR_PREFERENCES_FrameDrop "Kép eldobás"
+#define MSGTR_PREFERENCES_HFrameDrop "Erőszakos kép eldobó"
 #define MSGTR_PREFERENCES_Flip "Kép fejjel lefelé"
 #define MSGTR_PREFERENCES_Panscan "Panscan: "
 #define MSGTR_PREFERENCES_Video "Video"
-#define MSGTR_PREFERENCES_OSDTimer "Óra es indikatorok"
+#define MSGTR_PREFERENCES_OSDTimer "Óra es indikátorok"
 #define MSGTR_PREFERENCES_OSDProgress "Csak a százalék jelzők"
 #define MSGTR_PREFERENCES_Subtitle "Felirat:"
 #define MSGTR_PREFERENCES_SUB_Delay "Késleltetés: "
 #define MSGTR_PREFERENCES_SUB_FPS "FPS:"
 #define MSGTR_PREFERENCES_SUB_POS "Pozíciója: "
-#define MSGTR_PREFERENCES_SUB_AutoLoad "Felirat autómatikus betöltésének tiltása"
+#define MSGTR_PREFERENCES_SUB_AutoLoad "Felirat automatikus betöltésének tiltása"
 #define MSGTR_PREFERENCES_SUB_Unicode "Unicode felirat"
 #define MSGTR_PREFERENCES_SUB_MPSUB "A film feliratának konvertálása MPlayer felirat formátumba"
 #define MSGTR_PREFERENCES_SUB_SRT "A film feliratának konvertálása SubViewer ( SRT ) formátumba"
-#define MSGTR_PREFERENCES_Font "Betük:"
-#define MSGTR_PREFERENCES_FontFactor "Betü együttható:"
+#define MSGTR_PREFERENCES_Font "Betűk:"
+#define MSGTR_PREFERENCES_FontFactor "Betű együttható:"
 #define MSGTR_PREFERENCES_PostProcess "Képjavítás"
-#define MSGTR_PREFERENCES_AutoQuality "Auto quality: "
+#define MSGTR_PREFERENCES_AutoQuality "Autómatikus minőség állítás: "
 #define MSGTR_PREFERENCES_NI "non-interleaved  AVI  feltételezése (hibás AVI-knál segíthet"
-#define MSGTR_PREFERENCES_IDX "Az AVI indexének újraéptése, ha szükségesÁ"
+#define MSGTR_PREFERENCES_IDX "Az AVI indexének újraépítése, ha szükséges"
 #define MSGTR_PREFERENCES_VideoCodecFamily "Video kodek család:"
 #define MSGTR_PREFERENCES_FRAME_OSD_Level "OSD szint"
 #define MSGTR_PREFERENCES_FRAME_Subtitle "Felirat"
-#define MSGTR_PREFERENCES_FRAME_Font "Betü"
+#define MSGTR_PREFERENCES_FRAME_Font "Betű"
 #define MSGTR_PREFERENCES_FRAME_PostProcess "Képjavítás"
 #define MSGTR_PREFERENCES_FRAME_CodecDemuxer "Codec & demuxer"
 #define MSGTR_PREFERENCES_OSS_Device "Meghajtó:"
 #define MSGTR_PREFERENCES_OSS_Mixer "Mixer:"
 #define MSGTR_PREFERENCES_Message "Kérlek emlékezz, néhány opció igényli a lejátszás újraindítását."
+#define MSGTR_PREFERENCES_DXR3_VENC "Video kódoló:"
+#define MSGTR_PREFERENCES_DXR3_LAVC "LAVC használata (ffmpeg)"
+#define MSGTR_PREFERENCES_DXR3_FAME "FAME használata"
+#define MSGTR_PREFERENCES_FontEncoding1 "Unicode"
+#define MSGTR_PREFERENCES_FontEncoding2 "Nyugat-Európai karakterkészlet (ISO-8859-1)"
+#define MSGTR_PREFERENCES_FontEncoding3 "Nyugat-Európai karakterkészlet euróval (ISO-8859-15)"
+#define MSGTR_PREFERENCES_FontEncoding4 "Szláv / Közép-Európai karakterkészlet (ISO-8859-2)"
+#define MSGTR_PREFERENCES_FontEncoding5 "Eszperantó, gall, máltai, török karakterkészlet (ISO-8859-3)"
+#define MSGTR_PREFERENCES_FontEncoding6 "Régi baltik karakterkészlet (ISO-8859-4)"
+#define MSGTR_PREFERENCES_FontEncoding7 "Cirill karakterkészlet (ISO-8859-5)"
+#define MSGTR_PREFERENCES_FontEncoding8 "Arab karakterkészlet (ISO-8859-6)"
+#define MSGTR_PREFERENCES_FontEncoding9 "Modern görög karakterkészlet (ISO-8859-7)"
+#define MSGTR_PREFERENCES_FontEncoding10 "Török karakterkészlet (ISO-8859-9)"
+#define MSGTR_PREFERENCES_FontEncoding11 "Baltik karakterkészlet (ISO-8859-13"
+#define MSGTR_PREFERENCES_FontEncoding12 "Kelta karakterkészlet (ISO-8859-14)"
+#define MSGTR_PREFERENCES_FontEncoding13 "Héber karakterkészlet (ISO-8859-8)"
+#define MSGTR_PREFERENCES_FontEncoding14 "Orosz karakterkészlet (KOI8-R)"
+#define MSGTR_PREFERENCES_FontEncoding15 "Ukrán, Belorusz karakterkészlet (KOI8-U/UR)"
+#define MSGTR_PREFERENCES_FontEncoding16 "Egyszerű kínai karakterkészlet (CP936)"
+#define MSGTR_PREFERENCES_FontEncoding17 "Tradicionális kínai karakterkészlet (BIG5)"
+#define MSGTR_PREFERENCES_FontEncoding18 "Japán karakterkészlet (SHIFT-JIS)"
+#define MSGTR_PREFERENCES_FontEncoding19 "Koreai karakterkészlet (CP949)"
+#define MSGTR_PREFERENCES_FontEncoding20 "Thai karakterkészlet (CP874)"
+#define MSGTR_PREFERENCES_FontNoAutoScale "Nincs automata karakterméret választás"
+#define MSGTR_PREFERENCES_FontPropWidth "Karakterméret film szélességéhez való állítása"
+#define MSGTR_PREFERENCES_FontPropHeight "Karakterméret film magasságához való állítása"
+#define MSGTR_PREFERENCES_FontPropDiagonal "Karakterméret film átlójához való állítása"
+#define MSGTR_PREFERENCES_FontEncoding "Kódolás:"
+#define MSGTR_PREFERENCES_FontBlur "Blur:"
+#define MSGTR_PREFERENCES_FontOutLine "Körvonal:"
+#define MSGTR_PREFERENCES_FontTextScale "Szöveg skála:"
+#define MSGTR_PREFERENCES_FontOSDScale "OSD skála:"
+#define MSGTR_PREFERENCES_SubtitleOSD "Felirat & OSD"
 
 // --- messagebox
 #define MSGTR_MSGBOX_LABEL_FatalError "végzetes hiba ..."
--- a/libvo/font_load_ft.c	Thu Aug 29 13:04:01 2002 +0000
+++ b/libvo/font_load_ft.c	Thu Aug 29 17:16:34 2002 +0000
@@ -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;
     }