]> git.sesse.net Git - vlc/commitdiff
freetype: add error-output
authorIlkka Ollakka <ileoo@videolan.org>
Thu, 6 Aug 2009 19:06:29 +0000 (22:06 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Thu, 6 Aug 2009 19:06:54 +0000 (22:06 +0300)
modules/misc/freetype.c

index c475f18bfe9bb9bada870b28eb9c87904b82f644..90edcdbcf0bab9d6d93fe9aba404ff77fb952c10 100644 (file)
@@ -381,7 +381,10 @@ static int Create( vlc_object_t *p_this )
     fontpattern = FcPatternCreate();
 
     if( !fontpattern )
+    {
+        msg_Err( p_filter, "Creating fontpattern failed");
         goto error;
+    }
 
 #ifdef WIN32
     if( p_dialog )
@@ -392,7 +395,10 @@ static int Create( vlc_object_t *p_this )
     free( psz_fontsize );
 
     if( FcConfigSubstitute( NULL, fontpattern, FcMatchPattern ) == FcFalse )
+    {
+        msg_Err( p_filter, "FontSubstitute failed");
         goto error;
+    }
     FcDefaultSubstitute( fontpattern );
 
 #ifdef WIN32
@@ -404,12 +410,18 @@ static int Create( vlc_object_t *p_this )
      * returns NULL or doesn't set to to Match on all Match cases.*/
     fontmatch = FcFontMatch( NULL, fontpattern, &fontresult );
     if( !fontmatch || fontresult == FcResultNoMatch )
+    {
+        msg_Err( p_filter, "Fontmatching failed");
         goto error;
+    }
 
     FcPatternGetString( fontmatch, FC_FILE, 0, (FcChar8 **)&psz_fontfile);
     FcPatternGetInteger( fontmatch, FC_INDEX, 0, &fontindex );
     if( !psz_fontfile )
+    {
+        msg_Err( p_filter, "Failed to get fontfile");
         goto error;
+    }
 
     msg_Dbg( p_filter, "Using %s as font from file %s", psz_fontfamily, psz_fontfile );
     p_sys->psz_fontfamily = strdup( psz_fontfamily );