Page 1 of 1

Korean Font is not loaded on Windows7

Posted: 03 Dec 2012 12:27
by JoungEunKim
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. :)

Re: Korean Font is not loaded on Windows7

Posted: 03 Dec 2012 14:02
by nkoriyama
I think your patch, reintroducing fontconfig to Windows, will be rejected.

And it's known issue. See ticket 6350.
I attached a patch on the ticket, but the patch has performance problem...
I don't have time for it.
Patch welcome!

Re: Korean Font is not loaded on Windows7

Posted: 04 Dec 2012 12:36
by JoungEunKim
Hi. nkiriyama.

I don't know, you alread discussed like that. :)

I was read your ticket and ticket 5700.

I don't test your patch yet.

My issue was one, but now two.

First. In my case, windows 7 system register have Korean font, but that has only an English name.

So current VLC 2.0.4 don't work.

Second. I was checked other PC(OS is same), that has Korean font, that has two names one is a Korean, other is an English.

But that is not worked, like my system.

I think ticket 5700 is second problem's solution.

When I was debug with visual studio, "psz_fontfamily" value needs to convert.

So I think that is solution... :)


But First problem is different.

I think that problem needs fontconfig.

English font don't need that, but Korean needs fontconfig.

fontconfig is sometimes caching is fail. But that is easy way to get font name.

Please consider about that. :D

Bye the way. when I was ./configure, I was added --enable-freetype and --enable-fontconfig, but makefile doesn't have HAVE_FONTCONFIG.

So I was modified makefile. I don't know how. Please teach me. :?

Have a nice day!!!

Re: Korean Font is not loaded on Windows7

Posted: 04 Dec 2012 15:51
by Jean-Baptiste Kempf
no way to get fontconfig back.

Re: Korean Font is not loaded on Windows7

Posted: 05 Dec 2012 13:43
by JoungEunKim
no way to get fontconfig back.
Oh. I see.

And I was confused that second part, it was alread fixed. Sorry about that. :oops:

Have a nice day. bye!!!

Re: Korean Font is not loaded on Windows7

Posted: 05 Dec 2012 14:15
by Jean-Baptiste Kempf
Well, GDI+ could help, no? Or DirectWrite?

Re: Korean Font is not loaded on Windows7

Posted: 07 Dec 2012 12:33
by JoungEunKim
Well, GDI+ could help, no? Or DirectWrite?
Hi.

I was tested GDI+ patch.

At first. I was test on Visual Studio, it works.

But Cygwin is not working.

I'm not sure, that is right, because my Cygwin was old so, I was upgrade, and compile.

That time Cygwin part has some problem to compile.

By the way, compile is complete and to run VLC, but not load Korean.

I don't have enough time to debug.

I'll try more, next week... :D

Bye!!!

Re: Korean Font is not loaded on Windows7

Posted: 10 Dec 2012 14:57
by Jean-Baptiste Kempf
cool.

Re: Korean Font is not loaded on Windows7

Posted: 12 Dec 2012 12:21
by JoungEunKim
Hi. Jean-Baptiste Kempf.

GDI+ is working!!!

I was missing some souce with VLC original version. :oops:

cygwin reinstall was nightmare...

I was not found my mistake, so I was reintalled cygwin, many times...

But today I found my problem. :mrgreen:

By the way, GDI+ is working...

Bye!!!

Re: Korean Font is not loaded on Windows7

Posted: 13 Dec 2012 00:59
by Jean-Baptiste Kempf
You mean the GDI+ patch?

Re: Korean Font is not loaded on Windows7

Posted: 13 Dec 2012 21:49
by JoungEunKim
You mean the GDI+ patch?
Yes.

I was tested nkoriyama's ticket 6350.

It works.

Have a nice day!!!

Re: Korean Font is not loaded on Windows7

Posted: 14 Dec 2012 01:30
by Jean-Baptiste Kempf
OK, we probably need to merge it then.

Re: Korean Font is not loaded on Windows7

Posted: 14 Dec 2012 14:13
by JoungEunKim
OK, we probably need to merge it then.
Nice!!!

I'm grateful. :D

Have a nice weekend...