Hi, Current fontconfig will only recognize zh-hk fonts as zh-tw fonts. However they are different. The attached small patch can fix this issue. I removed 0xF907 from zh_hk.orth file, because some popular zh-hk fonts don''t have this char, and this char is unimportant. Regards James Su -------------- next part -------------- A non-text attachment was scrubbed... Name: fontconfig-zh-hk.diff Type: text/x-patch Size: 555 bytes Desc: not available Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20060105/b8eca379/fontconfig-zh-hk.bin
Hi, However, with this patch, some Simplified Chinese fonts may be detected to support zh-hk as well. So I''m just thinking if it''s ok to add a code U+20547 into zh_hk.orth, which is an additional Chinese chars in CJK-Ext B required by HKSCS-2001 or later. The big5 code of this char is 0x FA40, which was mapped to U+E000 in old HKSCS standard. Then all available Simplified Chinese fonts will be filtered out. Regards James Su On 1/5/06, Zhe Su <james.su@gmail.com> wrote:> Hi, > Current fontconfig will only recognize zh-hk fonts as zh-tw fonts. > However they are different. The attached small patch can fix this > issue. I removed 0xF907 from zh_hk.orth file, because some popular > zh-hk fonts don''t have this char, and this char is unimportant. > > Regards > James Su > > >
Zhe Su wrote:> Hi, > However, with this patch, some Simplified Chinese fonts may be > detected to support zh-hk as well. So I''m just thinking if it''s ok to > add a code U+20547 into zh_hk.orth, which is an additional Chinese > chars in CJK-Ext B required by HKSCS-2001 or later. The big5 code of > this char is 0x FA40, which was mapped to U+E000 in old HKSCS > standard. Then all available Simplified Chinese fonts will be filtered > out.If you still think this is a good solution, send me a patch and I''ll check it in; I don''t really know enough about the issues involved here. pat
Hi, The attachment is updated patch. Regards James Su On 1/25/06, Patrick Lam <plam@mit.edu> wrote:> Zhe Su wrote: > > Hi, > > However, with this patch, some Simplified Chinese fonts may be > > detected to support zh-hk as well. So I''m just thinking if it''s ok to > > add a code U+20547 into zh_hk.orth, which is an additional Chinese > > chars in CJK-Ext B required by HKSCS-2001 or later. The big5 code of > > this char is 0x FA40, which was mapped to U+E000 in old HKSCS > > standard. Then all available Simplified Chinese fonts will be filtered > > out. > > If you still think this is a good solution, send me a patch and I''ll > check it in; I don''t really know enough about the issues involved here. > > pat >-------------- next part -------------- A non-text attachment was scrubbed... Name: fontconfig-zh-hk.diff Type: text/x-patch Size: 561 bytes Desc: not available Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20060125/fbab7a28/fontconfig-zh-hk.bin
I''ve committed the following patch: 2006-01-24 James Su <james.su@gmail.com> reviewed by: plam * src/fcfreetype.c (FcFreeTypeIsExclusiveLang): * fc-lang/zh_hk.orth: Treat zh-hk fonts differently from zh-tw fonts. This patch may cause fontconfig to treat A-X fonts differently from A-Y fonts; please mail the fontconfig list if this causes any problems. The change in FcFreeTypeIsExclusiveLang now will refuse to match a font even if the language part is the same and the country part is different. Let me know if this causes a problem. pat