Korean Font is not loaded on Windows7
Posted: 03 Dec 2012 12:27
Hi.
I was tested VLC 2.0.4 windows version.
When I was to choose KOREAN, it is not working.
Previous version VLC 1.1.6 was worked.
I was to debug that, Windows version VLC don't use fontconfig library, any more.
Windows 7 register don't have KORAN name.
Can you make merge WIN32 part and fontconfig ?
I think, freetype.c is modified like this.
line 91....
/* Win32 GDI */
#ifdef WIN32
# include <windows.h>
# include <shlobj.h>
# define HAVE_STYLES
//# undef HAVE_FONTCONFIG <== remove
#endif
line 1818...
#ifdef WIN32
psz_fontfile = Win32_Select( p_filter,
p_style->psz_fontname,
(p_style->i_style_flags & STYLE_BOLD) != 0,
(p_style->i_style_flags & STYLE_ITALIC) != 0,
-1,
&i_idx );
#ifdef HAVE_FONTCONFIG
if (psz_fontfile == NULL)
{
psz_fontfile = FontConfig_Select( NULL,
p_style->psz_fontname,
(p_style->i_style_flags & STYLE_BOLD) != 0,
(p_style->i_style_flags & STYLE_ITALIC) != 0,
-1,
&i_idx );
}
#endif
#elif defined( HAVE_FONTCONFIG )
psz_fontfile = FontConfig_Select( NULL,
p_style->psz_fontname,
(p_style->i_style_flags & STYLE_BOLD) != 0,
(p_style->i_style_flags & STYLE_ITALIC) != 0,
-1,
&i_idx );
#elif defined( __APPLE__ )
psz_fontfile = MacLegacy_Select( p_filter, p_style->psz_fontname, false, false, -1, &i_idx );
#else
psz_fontfile = NULL;
#endif
line 2711...
#if WIN32
psz_fontfile = Win32_Select( p_filter, psz_fontfamily, false, false,
p_sys->i_default_font_size, &fontindex );
#ifdef HAVE_FONTCONFIG
if (psz_fontfile == NULL)
{
FontConfig_BuildCache( p_filter );
/* */
psz_fontfile = FontConfig_Select( NULL, psz_fontfamily, false, false,
p_sys->i_default_font_size, &fontindex );
}
#endif
#elif defined(HAVE_FONTCONFIG)
FontConfig_BuildCache( p_filter );
/* */
psz_fontfile = FontConfig_Select( NULL, psz_fontfamily, false, false,
p_sys->i_default_font_size, &fontindex );
#elif defined(__APPLE__)
psz_fontfile = MacLegacy_Select( p_filter, psz_fontfamily, false, false, 0, &fontindex );
#elif defined(WIN32)
psz_fontfile = Win32_Select( p_filter, psz_fontfamily, false, false,
p_sys->i_default_font_size, &fontindex );
#endif
I'm not sure that is good, but please review about that.
I was tested VLC 2.0.4 windows version.
When I was to choose KOREAN, it is not working.
Previous version VLC 1.1.6 was worked.
I was to debug that, Windows version VLC don't use fontconfig library, any more.
Windows 7 register don't have KORAN name.
Can you make merge WIN32 part and fontconfig ?
I think, freetype.c is modified like this.
line 91....
/* Win32 GDI */
#ifdef WIN32
# include <windows.h>
# include <shlobj.h>
# define HAVE_STYLES
//# undef HAVE_FONTCONFIG <== remove
#endif
line 1818...
#ifdef WIN32
psz_fontfile = Win32_Select( p_filter,
p_style->psz_fontname,
(p_style->i_style_flags & STYLE_BOLD) != 0,
(p_style->i_style_flags & STYLE_ITALIC) != 0,
-1,
&i_idx );
#ifdef HAVE_FONTCONFIG
if (psz_fontfile == NULL)
{
psz_fontfile = FontConfig_Select( NULL,
p_style->psz_fontname,
(p_style->i_style_flags & STYLE_BOLD) != 0,
(p_style->i_style_flags & STYLE_ITALIC) != 0,
-1,
&i_idx );
}
#endif
#elif defined( HAVE_FONTCONFIG )
psz_fontfile = FontConfig_Select( NULL,
p_style->psz_fontname,
(p_style->i_style_flags & STYLE_BOLD) != 0,
(p_style->i_style_flags & STYLE_ITALIC) != 0,
-1,
&i_idx );
#elif defined( __APPLE__ )
psz_fontfile = MacLegacy_Select( p_filter, p_style->psz_fontname, false, false, -1, &i_idx );
#else
psz_fontfile = NULL;
#endif
line 2711...
#if WIN32
psz_fontfile = Win32_Select( p_filter, psz_fontfamily, false, false,
p_sys->i_default_font_size, &fontindex );
#ifdef HAVE_FONTCONFIG
if (psz_fontfile == NULL)
{
FontConfig_BuildCache( p_filter );
/* */
psz_fontfile = FontConfig_Select( NULL, psz_fontfamily, false, false,
p_sys->i_default_font_size, &fontindex );
}
#endif
#elif defined(HAVE_FONTCONFIG)
FontConfig_BuildCache( p_filter );
/* */
psz_fontfile = FontConfig_Select( NULL, psz_fontfamily, false, false,
p_sys->i_default_font_size, &fontindex );
#elif defined(__APPLE__)
psz_fontfile = MacLegacy_Select( p_filter, psz_fontfamily, false, false, 0, &fontindex );
#elif defined(WIN32)
psz_fontfile = Win32_Select( p_filter, psz_fontfamily, false, false,
p_sys->i_default_font_size, &fontindex );
#endif
I'm not sure that is good, but please review about that.