Commit 4e27ee7b authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf
Browse files

Freetype: correctly load fonts with complete path

Close #5495
parent fdb50f7d
......@@ -616,10 +616,19 @@ static char* Win32_Select( filter_t *p_filter, const char* family,
i_idx = 0;
/* */
char *psz_tmp;
if( asprintf( &psz_tmp, "%s\\%s", p_filter->p_sys->psz_win_fonts_path, psz_filename ) == -1 )
return NULL;
return psz_tmp;
if( strchr( psz_filename, DIR_SEP_CHAR ) )
return psz_filename;
else
{
char *psz_tmp;
if( asprintf( &psz_tmp, "%s\\%s", p_filter->p_sys->psz_win_fonts_path, psz_filename ) == -1 )
{
free( psz_filename );
return NULL;
}
free( psz_filename );
return psz_tmp;
}
}
#endif
......
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