Commit fd07f90e authored by Salah-Eddin Shaban's avatar Salah-Eddin Shaban Committed by Jean-Baptiste Kempf

freetype: font fallback for Windows

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 195da069
......@@ -62,7 +62,7 @@ libwin32text_plugin_la_LIBADD = -lgdi32
if HAVE_WIN32
libfreetype_plugin_la_LIBADD += -liconv -lz
if !HAVE_WINSTORE
libfreetype_plugin_la_LIBADD += -lgdi32
libfreetype_plugin_la_LIBADD += -lgdi32 -lusp10
text_LTLIBRARIES += libwin32text_plugin.la
endif
endif
......@@ -1273,7 +1273,13 @@ static int Create( vlc_object_t *p_this )
p_sys->pf_select = MacLegacy_Select;
#endif
#elif defined( _WIN32 ) && defined( HAVE_GET_FONT_BY_FAMILY_NAME )
p_sys->pf_select = Win32_Select;
const char *const ppsz_win32_default[] =
{ "Tahoma", "FangSong", "SimHei", "KaiTi" };
p_sys->pf_get_family = Win32_GetFamily;
p_sys->pf_get_fallbacks = Win32_GetFallbacks;
p_sys->pf_select = Generic_Select;
InitDefaultList( p_filter, ppsz_win32_default,
sizeof( ppsz_win32_default ) / sizeof( *ppsz_win32_default ) );
#elif defined( __ANDROID__ )
p_sys->pf_get_family = Android_GetFamily;
p_sys->pf_get_fallbacks = Android_GetFallbacks;
......
This diff is collapsed.
......@@ -127,10 +127,10 @@ void FontConfig_BuildCache( filter_t *p_filter );
#endif
#if defined( _WIN32 ) && !VLC_WINSTORE_APP
char* Win32_Select( filter_t *p_filter, const char* family,
bool b_bold, bool b_italic,
int *i_idx, uni_char_t codepoint );
vlc_family_t *Win32_GetFallbacks( filter_t *p_filter, const char *psz_family,
uni_char_t codepoint );
const vlc_family_t *Win32_GetFamily( filter_t *p_filter, const char *psz_family );
#endif /* _WIN32 */
#ifdef __APPLE__
......
......@@ -58,6 +58,14 @@
#include "text_layout.h"
#include "freetype.h"
/* Win32 */
#ifdef _WIN32
# undef HAVE_FONTCONFIG
# if !VLC_WINSTORE_APP
# define HAVE_FONT_FALLBACK
# endif
#endif
/* FontConfig */
#ifdef HAVE_FONTCONFIG
# define HAVE_FONT_FALLBACK
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment