[vlc-commits] Freetype: allow to pass a font on WinRT
Jean-Baptiste Kempf
git at videolan.org
Thu Mar 6 18:34:15 CET 2014
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Mar 6 18:33:13 2014 +0100| [dacf900cafa1723f8620db5c0d10aa86f7f93c5a] | committer: Jean-Baptiste Kempf
Freetype: allow to pass a font on WinRT
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dacf900cafa1723f8620db5c0d10aa86f7f93c5a
---
modules/text_renderer/freetype.c | 6 ++++--
modules/text_renderer/platform_fonts.c | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/modules/text_renderer/freetype.c b/modules/text_renderer/freetype.c
index 573d49b..f7fcd80 100644
--- a/modules/text_renderer/freetype.c
+++ b/modules/text_renderer/freetype.c
@@ -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;
diff --git a/modules/text_renderer/platform_fonts.c b/modules/text_renderer/platform_fonts.c
index 3e0c3f1..c1d2e4e 100644
--- a/modules/text_renderer/platform_fonts.c
+++ b/modules/text_renderer/platform_fonts.c
@@ -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 )
More information about the vlc-commits
mailing list