[vlc-commits] freetype: use path helper
Francois Cartegnie
git at videolan.org
Tue Jul 21 16:07:19 CEST 2020
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jun 29 17:19:02 2020 +0200| [7463ea642b40b6dbbeb3d6c4916d7bff9b1fd327] | committer: Francois Cartegnie
freetype: use path helper
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7463ea642b40b6dbbeb3d6c4916d7bff9b1fd327
---
modules/text_renderer/freetype/fonts/win32.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/modules/text_renderer/freetype/fonts/win32.c b/modules/text_renderer/freetype/fonts/win32.c
index 04097a0dff..9dbe120a4f 100644
--- a/modules/text_renderer/freetype/fonts/win32.c
+++ b/modules/text_renderer/freetype/fonts/win32.c
@@ -380,16 +380,10 @@ static int CALLBACK EnumFontCallback(const ENUMLOGFONTEX *lpelfe, const NEWTEXTM
psz_fontfile = psz_filename;
else
{
- /* Get Windows Font folder */
- char *psz_win_fonts_path = GetWindowsFontPath();
- if( asprintf( &psz_fontfile, "%s\\%s", psz_win_fonts_path, psz_filename ) == -1 )
- {
- free( psz_filename );
- free( psz_win_fonts_path );
- return 1;
- }
+ psz_fontfile = MakeFilePath( ctx->p_filter, psz_filename );
free( psz_filename );
- free( psz_win_fonts_path );
+ if( !psz_fontfile )
+ return 1;
}
NewFont( psz_fontfile, i_index, b_bold, b_italic, p_family );
More information about the vlc-commits
mailing list