FcPatternAddBool( pat, FC_OUTLINE, FcTrue );
FcPatternAddInteger( pat, FC_SLANT, b_italic ? FC_SLANT_ITALIC : FC_SLANT_ROMAN );
FcPatternAddInteger( pat, FC_WEIGHT, b_bold ? FC_WEIGHT_EXTRABOLD : FC_WEIGHT_NORMAL );
- if( i_size != -1 )
+ if( i_size > 0 )
{
- char *psz_fontsize;
- if( asprintf( &psz_fontsize, "%d", i_size ) != -1 )
- {
- FcPatternAddString( pat, FC_SIZE, (const FcChar8 *)psz_fontsize );
- free( psz_fontsize );
- }
+ FcPatternAddDouble( pat, FC_SIZE, (double)i_size );
}
/* */
}
#endif
-#ifdef _WIN32
+#if defined( _WIN32 ) && !VLC_WINSTORE_APP
#define FONT_DIR_NT _T("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts")
static int GetFileFontByName( LPCTSTR font_name, char **psz_filename )
return GetFileFontByName( (LPCTSTR)lpelfe->elfFullName, (char **)lParam );
}
-char* GetWindowsFontPath()
+static char* GetWindowsFontPath()
{
wchar_t wdir[MAX_PATH];
if( S_OK != SHGetFolderPathW( NULL, CSIDL_FONTS, NULL, SHGFP_TYPE_CURRENT, wdir ) )
VLC_UNUSED(i_idx);
char *psz_fontname;
-# ifdef _WIN32
+# if defined( _WIN32 ) && !VLC_WINSTORE_APP
/* Get Windows Font folder */
char *psz_win_fonts_path = GetWindowsFontPath();
if( asprintf( &psz_fontname, "%s\\%s", psz_win_fonts_path, psz_font ) == -1 )