]> git.sesse.net Git - vlc/blobdiff - modules/text_renderer/freetype.c
Qt: move extensions tab away
[vlc] / modules / text_renderer / freetype.c
index 34016213fadad41df3f0deb633f518f0b5914b82..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 */
@@ -1927,6 +1929,17 @@ static int Create( vlc_object_t *p_this )
 #endif
     }
 
+    /* set default psz_monofontname */
+    if( !psz_monofontfamily || !*psz_monofontfamily )
+    {
+        free( psz_monofontfamily );
+#ifdef HAVE_GET_FONT_BY_FAMILY_NAME
+        psz_monofontfamily = strdup( DEFAULT_MONOSPACE_FAMILY );
+#else
+        psz_monofontfamily = File_Select( DEFAULT_MONOSPACE_FONT_FILE );
+#endif
+    }
+
     /* Set the current font file */
     p_sys->style.psz_fontname = psz_fontname;
     p_sys->style.psz_monofontname = psz_monofontfamily;
@@ -1938,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;