]> git.sesse.net Git - vlc/commitdiff
Freetype: allow to pass a font on WinRT
authorJean-Baptiste Kempf <jb@videolan.org>
Thu, 6 Mar 2014 17:33:13 +0000 (18:33 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 6 Mar 2014 17:33:13 +0000 (18:33 +0100)
modules/text_renderer/freetype.c
modules/text_renderer/platform_fonts.c

index 573d49b2548d711a41ba25cc706c5271f41df767..f7fcd80f34338d9c1dbc569f997904ed4a8d0f30 100644 (file)
@@ -71,7 +71,9 @@
 /* Win32 */
 #ifdef _WIN32
 # undef HAVE_FONTCONFIG
-# define HAVE_GET_FONT_BY_FAMILY_NAME
+# if !VLC_WINSTORE_APP
+#  define HAVE_GET_FONT_BY_FAMILY_NAME
+# endif
 #endif
 
 /* FontConfig */
@@ -1949,7 +1951,7 @@ static int Create( vlc_object_t *p_this )
 #if !TARGET_OS_IPHONE
     p_sys->pf_select = MacLegacy_Select;
 #endif
-#elif defined( _WIN32 )
+#elif defined( _WIN32 ) && defined( HAVE_GET_FONT_BY_FAMILY_NAME )
     p_sys->pf_select = Win32_Select;
 #else
     p_sys->pf_select = Dummy_Select;
index 3e0c3f183524e58fc927d7deb32aa1a70f8c3654..c1d2e4ec612f2c54bbf0a9ef2f92ff4d62c01628 100644 (file)
@@ -418,7 +418,7 @@ char* Dummy_Select( filter_t *p_filter, const char* psz_font,
     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 )