Funda Wang
2005-Nov-21 08:51 UTC
[Fontconfig] How to disable the "global advance" for CJK fonts?
Ambrose> Is there an "official" way Ambrose> to disable the "global advance" for CJK fonts? http://cvs.mandrakesoft.com/cgi-bin/cvsweb.cgi/SPECS/fontconfig/fontconfig-2.2.96-dual_width.patch
Ambrose Li
2005-Nov-21 08:51 UTC
[Fontconfig] How to disable the "global advance" for CJK fonts?
Hi, sorry if this has been asked before. Is there an "official" way to disable the "global advance" for CJK fonts? From what I''ve read in fonts.conf, this should be possible. But when I tried it in local.conf, I did not get any results. fontconfig version is 2.3.0. (In fact, from the looks of how my mozilla renders pages, it looks like even the default list in fonts.conf is not working)-: Thanks very much in advance. regards, - ambrose
Ambrose Li
2005-Nov-21 08:51 UTC
[Fontconfig] How to disable the "global advance" for CJK fonts?
Hi, On Fri, Mar 18, 2005 at 01:57:56PM -0800, Keith Packard wrote:> > Feel free to send along more family names that need this treatment and > I''ll stick ''em in the next release.I believe currently (for whatever reason I don''t think this used to be the case) all the Arphic fonts need to have global advance disabled. With some others familiar ones, at least the following common fonts must have "global advance" disabled: AR PL KaitiM Big5 AR PL SungtiL GB AR PL Mingti2L Big5 AR PL KaitiM GB Kochi Gothic Kochi Mincho Ming(for ISO10646) [i.e., HK government''s reference font] MS Hei MS Song There are also other free and freeware fonts that don''t work, e.g., Mikachan, Y.OzFont, MT_TARE. (I don''t know whether the Win2000 equivalents of the above MS fonts would cause problems; I don''t have them for checking. MS Gothic, plus the Baekmuk and Wang fonts, do not seem to be affected.) But I think the real question we should as is: Why do we need to do this at all? All these fonts work right out of the box in Windows (any version from Win95 onwards) and it seems also in Mac OSX, and many of these are system fonts in Linux and/or Windows. I tend to feel that we (i.e., the Free Software side) must be doing something fundamentally wrong, or at least something "de-factoly" wrong. We seem to be dealing with an "exception" list of unknown length and the list will be growing and it will never be complete. Some time ago, iirc, someone else proposed on this list that global advance be turned off by default for all CJK fonts; from what I observe that would be an entirely reasonable thing, and I''d like to know any technical reason why that should not be the case. Regards, - Ambrose
Funda Wang
2005-Nov-21 08:51 UTC
[Fontconfig] Re[2]: How to disable the "global advance" for CJK fonts?
Keith> Feel free to send along more family names that need this treatment and Keith> I''ll stick ''em in the next release. I''m afraid it applies to all the Chinese fonts. Almost all the Chinese fonts have built-in half-width and full-width characters. It would be better fix it at libxft level(bug#2715).
Keith Packard
2005-Nov-21 08:51 UTC
[Fontconfig] How to disable the "global advance" for CJK fonts?
Around 2 o''clock on Mar 19, Ambrose wrote:> Ambrose> Is there an "official" way > Ambrose> to disable the "global advance" for CJK fonts?In fontconfig 2.3, there are several CJK fonts configured to disable global advance already. Check out the fonts.conf where you''ll find: <!-- Some Asian fonts misadvertise themselves as monospaced when in fact they are dual-spaced (half and full). This makes FreeType very confused as it forces all widths to match. Undo this magic by disabling the width forcing code --> <match target="font"> <test name="family"><string>GulimChe</string></test> <edit name="globaladvance"><bool>false</bool></edit> </match> <match target="font"> <test name="family"><string>DotumChe</string></test> <edit name="globaladvance"><bool>false</bool></edit> </match> <match target="font"> <test name="family"><string>BatangChe</string></test> <edit name="globaladvance"><bool>false</bool></edit> </match> <match target="font"> <test name="family"><string>GungsuhChe</string></test> <edit name="globaladvance"><bool>false</bool></edit> </match> Feel free to send along more family names that need this treatment and I''ll stick ''em in the next release. -keith -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 228 bytes Desc: not available Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20050318/69d03f6e/attachment.pgp
Ambrose Li
2005-Nov-21 08:51 UTC
[Fontconfig] How to disable the "global advance" for CJK fonts?
On Fri, Mar 18, 2005 at 11:50:43PM -0500, Ambrose Li wrote:> > AR PL KaitiM Big5 > AR PL SungtiL GB > AR PL Mingti2L Big5 > AR PL KaitiM GB > Kochi Gothic > Kochi Mincho > Ming(for ISO10646) [i.e., HK government''s reference font] > MS Hei > MS SongI forgot to write that MingLiU should be in the list too. Honestly, in my collection of CJK fonts, the list of "exceptions" is about the same length as the list of correctly-handled fonts (if not longer). When you have the number of exceptions the same as the number of non-exceptions, I don''t think the exceptions can be rightly called exceptions at all.
Keith Packard
2005-Nov-21 08:51 UTC
[Fontconfig] How to disable the "global advance" for CJK fonts?
Around 0 o''clock on Mar 19, Ambrose Li wrote:> Honestly, in my collection of CJK fonts, the list of "exceptions" > is about the same length as the list of correctly-handled fonts > (if not longer).I labeled it as an exceptional case because FreeType did (not to disclaim responsibility, but to notice that I used no first-hand knowledge of fonts when making this decision).>From what people explained to me at the time, the font itself says whetherto use global advance and this actually instructs FreeType to disregard that instruction. Is there some sensible way to automatically tell whether global advance is giving bogus values? I don''t even care how expensive it is to compute as we can do it at font scan time instead of font load time. -keith -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 228 bytes Desc: not available Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20050318/b2b42bb7/attachment.pgp
Xie Qian
2005-Nov-21 08:51 UTC
[Fontconfig] Re: How to disable the "global advance" for CJK fonts?
Hi there, Just trying to clear my confusion. In original mail, the modification of fonts.conf shows an edit clause on "globaladvance" with binding="strong". I don''t know what effect will the strong-binding bring. I dug source codes of fontconfig some time ago, AFAIK, strong-binding only make family name priorer than lang. Is things changed a lot? Thanks for any hint. Xie Qian Open System and Chinese Information Processing Center, Institute of Software, Chinese Academy of Sciences, P.O. Box 8718, Beijing 100080, CHINA ----- Original Message ----- From: "Mike FABIAN" <mfabian@suse.de> To: "Ambrose Li" <acli@ada.dhs.org> Cc: "Keith Packard" <keithp@keithp.com>; <fontconfig@fontconfig.org> Sent: Wednesday, June 29, 2005 9:58 PM Subject: [Fontconfig] Re: How to disable the "global advance" for CJK fonts?> Ambrose Li <acli@ada.dhs.org> $B$5$s$O=q$-$^$7$?(B: > > > Some time ago, iirc, someone else proposed on this list that global > > advance be turned off by default for all CJK fonts; from what I > > observe that would be an entirely reasonable thing, and I''d like to > > know any technical reason why that should not be the case. > > Currently I use the following workaround, which seems to work OK: > > <!-- > The dual-width Asian fonts (spacing=dual) are not rendered correctly, > apparently FreeType forces all widths to match. Trying to disable the > width forcing code by setting globaladvance=false alone doesn''t help. > As a brute force workaround, also set spacing=proportional, i.e. handle > them as proportional fonts: > --> > > <match target="font"> > <test name="lang" compare="contains"> > <string>ja</string> > <string>zh</string> > <string>ko</string> > </test> > <test name="spacing" compare="eq"> > <const>dual</const> > </test> > <edit name="spacing"> > <const>proportional</const> > </edit> > <edit name="globaladvance" binding="strong"> > <bool>false</bool> > </edit> > </match> > > -- > Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian > $B?gL2ITB-$O$$$$;E;v$NE($@!#(B > > _______________________________________________ > fontconfig mailing list > fontconfig@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/fontconfig >
Funda Wang
2005-Nov-21 08:51 UTC
[Fontconfig] Re: How to disable the "global advance" for CJK fonts?
Keith> Is global advance *ever* useful? Should the default in Xft be to ignore Keith> global advance unless someone specifically sets Keith> the flag? It seems like this should be the case as Fontconfig detects Keith> monospaced fonts by disabling global advance and comparing glyph widths Keith> without it. https://bugs.freedesktop.org/show_bug.cgi?id=2715
Mike FABIAN
2005-Nov-21 08:51 UTC
[Fontconfig] Re: How to disable the "global advance" for CJK fonts?
Ambrose Li <acli@ada.dhs.org> ????????:> Some time ago, iirc, someone else proposed on this list that global > advance be turned off by default for all CJK fonts; from what I > observe that would be an entirely reasonable thing, and I''d like to > know any technical reason why that should not be the case.Currently I use the following workaround, which seems to work OK: <!-- The dual-width Asian fonts (spacing=dual) are not rendered correctly, apparently FreeType forces all widths to match. Trying to disable the width forcing code by setting globaladvance=false alone doesn''t help. As a brute force workaround, also set spacing=proportional, i.e. handle them as proportional fonts: --> <match target="font"> <test name="lang" compare="contains"> <string>ja</string> <string>zh</string> <string>ko</string> </test> <test name="spacing" compare="eq"> <const>dual</const> </test> <edit name="spacing"> <const>proportional</const> </edit> <edit name="globaladvance" binding="strong"> <bool>false</bool> </edit> </match> -- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian ?????????????
Keith Packard
2005-Nov-21 08:51 UTC
[Fontconfig] Re: How to disable the "global advance" for CJK fonts?
On Wed, 2005-06-29 at 15:58 +0200, Mike FABIAN wrote:> Ambrose Li <acli@ada.dhs.org> ????????: > > > Some time ago, iirc, someone else proposed on this list that global > > advance be turned off by default for all CJK fonts; from what I > > observe that would be an entirely reasonable thing, and I''d like to > > know any technical reason why that should not be the case.Is global advance *ever* useful? Should the default in Xft be to ignore global advance unless someone specifically sets the flag? It seems like this should be the case as Fontconfig detects monospaced fonts by disabling global advance and comparing glyph widths without it.> Currently I use the following workaround, which seems to work OK: > > <!-- > The dual-width Asian fonts (spacing=dual) are not rendered correctly, > apparently FreeType forces all widths to match. Trying to disable the > width forcing code by setting globaladvance=false alone doesn''t help. > As a brute force workaround, also set spacing=proportional, i.e. handle > them as proportional fonts: > -->FreeType isn''t responsible for interpreting the spacing value, that''s purely in Xft. That change is in Xft version 2.1.7, which was released 2005-3-29. -keith -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20050629/08f9f252/attachment.pgp