- char *psz_font_dir = NULL;
-
-#if defined(WIN32)
- /* This makes Windows build of VLC hang */
- const UINT uPath = GetSystemWindowsDirectoryW( NULL, 0 );
- if( uPath > 0 )
- {
- wchar_t *psw_path = calloc( uPath + 1, sizeof(wchar_t) );
- if( psw_path )
- {
- if( GetSystemWindowsDirectoryW( psw_path, uPath + 1 ) > 0 )
- {
- char *psz_tmp = FromWide( psw_path );
- if( psz_tmp &&
- asprintf( &psz_font_dir, "%s\\Fonts", psz_tmp ) < 0 )
- psz_font_dir = NULL;
- free( psz_tmp );
- }
- free( psw_path );
- }
- }
-#endif
-
- if( !psz_font_dir )
- psz_font_dir = config_GetCacheDir();
-
- if( !psz_font_dir )
- goto error;
- msg_Dbg( p_dec, "Setting libass fontdir: %s", psz_font_dir );
- ass_set_fonts_dir( p_library, psz_font_dir );
- free( psz_font_dir );
-