Liu Qishuai wrote:
This patch appends all fonts on child_list so that if a character is not available in the font, other fonts will be automatically used. This is how Windows does to get a CJK character when a latin font is specified.
A lot of CJK-related bugs will be fixed after applying this patch.
Excellent!
In case AJ hesitates to apply this patch: Can you write a conformance test that verifies this behavior? Also, can you identify a bug in bugzilla this will fix? - Dan
2008/7/2 Dan Kegel dank@kegel.com:
Can you write a conformance test that verifies this behavior?
Sorry, I don't know how to write a test yet. Maybe I will write a test later.
Also, can you identify a bug in bugzilla this will fix?
Such as bug 4065, 10864, 14151.
Hi,
* Append all fonts on child_list so that if a character is not available in the font, * other fonts will be automatically used. This is how Windows does to get a CJK character * when a latin font is specified.
That's not correct, actually Windows does this by using FontLink registry, so does wine now. Your patch seems to break FontLink. "Automatic font substitution" often means wine will choose the CJK replacement font which user doesn't prefer to.
On CJK env, if a latin font doesn't not have a FontLink, it will fallback to use the FontLink of "Microsoft Sans Serif", so user can set preferred font there.
2008/7/2 Liu Qishuai lqs.buaa@gmail.com:
2008/7/2 Dan Kegel dank@kegel.com:
Can you write a conformance test that verifies this behavior?
Sorry, I don't know how to write a test yet. Maybe I will write a test later.
Also, can you identify a bug in bugzilla this will fix?
Such as bug 4065, 10864, 14151.
Please set the following registry key, it should fix those bugs:
[Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink] 1208451304 "Microsoft Sans Serif"=str(7):"simsun.ttc,SimSun\0gulim.ttc,Gulim\0msgothic.ttc,MS UI Gothic\0mingliu.ttc,PMingLiU\0" "Tahoma"=str(7):"simsun.ttc,SimSun\0gulim.ttc,Gulim\0msgothic.ttc,MS UI Gothic\0mingliu.ttc,PMingLiU\0"
Maybe we need a patch to set up the default FontLink of "Microsoft Sans Serif" and "Tahoma" now, since FontLink works fine on WIne.
No.
1. In Windows XP, I deleted the FontLink register key and rebooted, and the Chinese characters are still displaying correctly.
2. I moved simsun.ttc (The default font in Simplified Chinese) to another directory and rebooted. Windows XP automatically uses simhei.ttf (another Chinese font) to display Chinese characters. There is no register key for this font.
2008/7/2 Huang, Zhangrong hzhrong@gmail.com:
Hi,
* Append all fonts on child_list so that if a character is not available in the font, * other fonts will be automatically used. This is how Windows does to get a CJK character * when a latin font is specified.
That's not correct, actually Windows does this by using FontLink registry, so does wine now. Your patch seems to break FontLink. "Automatic font substitution" often means wine will choose the CJK replacement font which user doesn't prefer to.
On CJK env, if a latin font doesn't not have a FontLink, it will fallback to use the FontLink of "Microsoft Sans Serif", so user can set preferred font there.
2008/7/2 Liu Qishuai lqs.buaa@gmail.com:
2008/7/2 Dan Kegel dank@kegel.com:
Can you write a conformance test that verifies this behavior?
Sorry, I don't know how to write a test yet. Maybe I will write a test later.
Also, can you identify a bug in bugzilla this will fix?
Such as bug 4065, 10864, 14151.
Please set the following registry key, it should fix those bugs:
[Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink] 1208451304 "Microsoft Sans Serif"=str(7):"simsun.ttc,SimSun\0gulim.ttc,Gulim\0msgothic.ttc,MS UI Gothic\0mingliu.ttc,PMingLiU\0" "Tahoma"=str(7):"simsun.ttc,SimSun\0gulim.ttc,Gulim\0msgothic.ttc,MS UI Gothic\0mingliu.ttc,PMingLiU\0"
Maybe we need a patch to set up the default FontLink of "Microsoft Sans Serif" and "Tahoma" now, since FontLink works fine on WIne.
-- $ apt-get moo (__) (oo) /------/ / | ||
- /---/\
~~ ~~ ...."Have you mooed today?"...
Hi,
2008/7/2 Liu Qishuai lqs.buaa@gmail.com:
No.
- In Windows XP, I deleted the FontLink register key and rebooted,
and the Chinese characters are still displaying correctly.
I guess gdi32.dll has hard-coded the default FontLink registry, of course no prove.
- I moved simsun.ttc (The default font in Simplified Chinese) to
another directory and rebooted. Windows XP automatically uses simhei.ttf (another Chinese font) to display Chinese characters. There is no register key for this font.
This doesn't prove anything, creating a non-existent font will return mostly related font.
On Japanese Windows, if user select a Latin font in notepad, CJK chars will display incorrect. And I have a Simplified Chinese Windows XP box, which also displays CJK chars as squares, I have no idea what's wrong.
Hi, I rewrote a patch that doesn't break FontLink. http://www.winehq.org/pipermail/wine-patches/2008-July/057033.html
2008/7/2 Huang, Zhangrong hzhrong@gmail.com:
Hi,
2008/7/2 Liu Qishuai lqs.buaa@gmail.com:
No.
- In Windows XP, I deleted the FontLink register key and rebooted,
and the Chinese characters are still displaying correctly.
I guess gdi32.dll has hard-coded the default FontLink registry, of course no prove.
- I moved simsun.ttc (The default font in Simplified Chinese) to
another directory and rebooted. Windows XP automatically uses simhei.ttf (another Chinese font) to display Chinese characters. There is no register key for this font.
This doesn't prove anything, creating a non-existent font will return mostly related font.
On Japanese Windows, if user select a Latin font in notepad, CJK chars will display incorrect. And I have a Simplified Chinese Windows XP box, which also displays CJK chars as squares, I have no idea what's wrong.
-- $ apt-get moo (__) (oo) /------/ / | ||
- /---/\
~~ ~~ ...."Have you mooed today?"...
On Wed, Jul 2, 2008 at 9:34 AM, Liu Qishuai lqs.buaa@gmail.com wrote:
Hi, I rewrote a patch that doesn't break FontLink. http://www.winehq.org/pipermail/wine-patches/2008-July/057033.html
I tried this with Picasa. It fixed the font rendered as boxes, but now other parts of the interface is missing text.
Have you tried to set FontLink? It works for me, there are no places have font problem. (without automatic font substitution patch)
see: http://bugs.winehq.org/attachment.cgi?id=14546
[Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink] 1208451304 "Microsoft Sans Serif"=str(7):"simsun.ttc,SimSun\0gulim.ttc,Gulim\0msgothic.ttc,MS UI Gothic\0mingliu.ttc,PMingLiU\0" "Tahoma"=str(7):"simsun.ttc,SimSun\0gulim.ttc,Gulim\0msgothic.ttc,MS UI Gothic\0mingliu.ttc,PMingLiU\0"
Ensure your system have these fonts: simsun.ttc, gulim.ttc, msgothic.ttc and mingliu.ttc, or change the values with proper font name.
2008/7/3 Lei Zhang thestig@google.com:
I tried this with Picasa. It fixed the font rendered as boxes, but now other parts of the interface is missing text.
On Wed, Jul 2, 2008 at 5:13 PM, Huang, Zhangrong hzhrong@gmail.com wrote:
Ensure your system have these fonts: simsun.ttc, gulim.ttc, msgothic.ttc and mingliu.ttc, or change the values with proper font name.
Are these the only fonts that work? What about other fonts like arphic-uming? http://packages.debian.org/etch/ttf-arphic-uming
Hi,
2008/7/3 Lei Zhang thestig@google.com:
On Wed, Jul 2, 2008 at 5:13 PM, Huang, Zhangrong hzhrong@gmail.com wrote: Are these the only fonts that work? What about other fonts like arphic-uming? http://packages.debian.org/etch/ttf-arphic-uming
If you don't have those fonts, try the following 2 ways:
1. Replace simsun.ttc,SimSun with "AR PL ShanHeiSun Uni,uming.ttf"
or 2. Link uming.ttf to simsun.ttc: $ ln -s uming.ttf simsun.ttc
and set a FontSubstitutes registry:
[Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes] 1214393759 "SimSun"="AR PL ShanHeiSun Uni"
Yes, FontLink also works for me, but not everyone has those fonts installed. Wine should find a suitable font from fontconfig, in case the fonts in FontLink do not exist.
2008/7/3 Huang, Zhangrong hzhrong@gmail.com:
Have you tried to set FontLink? It works for me, there are no places have font problem. (without automatic font substitution patch)
see: http://bugs.winehq.org/attachment.cgi?id=14546
[Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink] 1208451304 "Microsoft Sans Serif"=str(7):"simsun.ttc,SimSun\0gulim.ttc,Gulim\0msgothic.ttc,MS UI Gothic\0mingliu.ttc,PMingLiU\0" "Tahoma"=str(7):"simsun.ttc,SimSun\0gulim.ttc,Gulim\0msgothic.ttc,MS UI Gothic\0mingliu.ttc,PMingLiU\0"
Ensure your system have these fonts: simsun.ttc, gulim.ttc, msgothic.ttc and mingliu.ttc, or change the values with proper font name.
2008/7/3 Lei Zhang thestig@google.com:
I tried this with Picasa. It fixed the font rendered as boxes, but now other parts of the interface is missing text.
-- $ apt-get moo (__) (oo) /------/ / | ||
- /---/\
~~ ~~ ...."Have you mooed today?"...
On Wed, Jul 2, 2008 at 5:13 PM, Huang, Zhangrong hzhrong@gmail.com wrote:
Have you tried to set FontLink? It works for me, there are no places have font problem. (without automatic font substitution patch)
see: http://bugs.winehq.org/attachment.cgi?id=14546
[Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink] 1208451304 "Microsoft Sans Serif"=str(7):"simsun.ttc,SimSun\0gulim.ttc,Gulim\0msgothic.ttc,MS UI Gothic\0mingliu.ttc,PMingLiU\0" "Tahoma"=str(7):"simsun.ttc,SimSun\0gulim.ttc,Gulim\0msgothic.ttc,MS UI Gothic\0mingliu.ttc,PMingLiU\0"
Ensure your system have these fonts: simsun.ttc, gulim.ttc, msgothic.ttc and mingliu.ttc, or change the values with proper font name.
Yes, you're right. Even without Liu Qishau's patch, if I add those registry settings, the Asian characters show up correctly.
Could you take a screenshot of this?
2008/7/3 Lei Zhang thestig@google.com:
I tried this with Picasa. It fixed the font rendered as boxes, but now other parts of the interface is missing text.
On Wed, Jul 2, 2008 at 8:33 PM, Liu Qishuai lqs.buaa@gmail.com wrote:
Could you take a screenshot of this?
Oh, sorry, I messed up. I tried again on a different system and it worked. With your patch, I didn't need to add the registry keys Zhangrong suggested.