Commit 4ae0ca4d authored by Ilkka Ollakka's avatar Ilkka Ollakka

freetype: add error-output

parent 507bd586
...@@ -381,7 +381,10 @@ static int Create( vlc_object_t *p_this ) ...@@ -381,7 +381,10 @@ static int Create( vlc_object_t *p_this )
fontpattern = FcPatternCreate(); fontpattern = FcPatternCreate();
if( !fontpattern ) if( !fontpattern )
{
msg_Err( p_filter, "Creating fontpattern failed");
goto error; goto error;
}
#ifdef WIN32 #ifdef WIN32
if( p_dialog ) if( p_dialog )
...@@ -392,7 +395,10 @@ static int Create( vlc_object_t *p_this ) ...@@ -392,7 +395,10 @@ static int Create( vlc_object_t *p_this )
free( psz_fontsize ); free( psz_fontsize );
if( FcConfigSubstitute( NULL, fontpattern, FcMatchPattern ) == FcFalse ) if( FcConfigSubstitute( NULL, fontpattern, FcMatchPattern ) == FcFalse )
{
msg_Err( p_filter, "FontSubstitute failed");
goto error; goto error;
}
FcDefaultSubstitute( fontpattern ); FcDefaultSubstitute( fontpattern );
#ifdef WIN32 #ifdef WIN32
...@@ -404,12 +410,18 @@ static int Create( vlc_object_t *p_this ) ...@@ -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.*/ * returns NULL or doesn't set to to Match on all Match cases.*/
fontmatch = FcFontMatch( NULL, fontpattern, &fontresult ); fontmatch = FcFontMatch( NULL, fontpattern, &fontresult );
if( !fontmatch || fontresult == FcResultNoMatch ) if( !fontmatch || fontresult == FcResultNoMatch )
{
msg_Err( p_filter, "Fontmatching failed");
goto error; goto error;
}
FcPatternGetString( fontmatch, FC_FILE, 0, (FcChar8 **)&psz_fontfile); FcPatternGetString( fontmatch, FC_FILE, 0, (FcChar8 **)&psz_fontfile);
FcPatternGetInteger( fontmatch, FC_INDEX, 0, &fontindex ); FcPatternGetInteger( fontmatch, FC_INDEX, 0, &fontindex );
if( !psz_fontfile ) if( !psz_fontfile )
{
msg_Err( p_filter, "Failed to get fontfile");
goto error; goto error;
}
msg_Dbg( p_filter, "Using %s as font from file %s", psz_fontfamily, psz_fontfile ); msg_Dbg( p_filter, "Using %s as font from file %s", psz_fontfamily, psz_fontfile );
p_sys->psz_fontfamily = strdup( psz_fontfamily ); p_sys->psz_fontfamily = strdup( psz_fontfamily );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment