Mike FABIAN
2006-Feb-07 10:45 UTC
[Fontconfig] fontconfig: FcConfigAppFontAddDir () doesn''t work right
See http://bugzilla.novell.com/show_bug.cgi?id=148693 for details. Patch by Takashi IWAI <tiwai@suse.de> attached. -------------- next part -------------- A non-text attachment was scrubbed... Name: fc-app-dir-fix-new.diff Type: text/x-patch Size: 3874 bytes Desc: not available Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20060207/23b3af27/fc-app-dir-fix-new.bin -------------- next part -------------- -- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian ?????????????
Patrick Lam
2006-Feb-07 13:59 UTC
[Fontconfig] fontconfig: FcConfigAppFontAddDir () doesn''t work right
Mike FABIAN wrote:> See > > http://bugzilla.novell.com/show_bug.cgi?id=148693I''m kind of concerned about this patch potentially bringing back the issues we had a while back with ''fc-cache .'' not doing the right thing, so I can''t commit it until I check that issue out. In particular, if we don''t normalize before we add a directory, it seems like fc-cache . might do the wrong thing. pat
Patrick Lam
2006-Feb-07 14:10 UTC
[Fontconfig] fontconfig: FcConfigAppFontAddDir () doesn''t work right
Mike FABIAN wrote:> See > > http://bugzilla.novell.com/show_bug.cgi?id=148693 > > for details.I''ve committed parts of Takashi''s patch and some work of my own which seem to make lilypond work and preserve the behaviour of ''fc-cache .''. Let me know if I broke something. pat
Patrick Lam
2006-Feb-07 21:06 UTC
[Fontconfig] fontconfig: FcConfigAppFontAddDir () doesn''t work right
Takashi Iwai wrote:> At Tue, 07 Feb 2006 17:03:30 -0500, > Patrick Lam wrote: > >>Mike FABIAN wrote: >> >>>See >>> >>>http://bugzilla.novell.com/show_bug.cgi?id=148693 >> >>I''m kind of concerned about this patch potentially bringing back the >>issues we had a while back with ''fc-cache .'' not doing the right thing, >>so I can''t commit it until I check that issue out. In particular, if we >>don''t normalize before we add a directory, it seems like fc-cache . >>might do the wrong thing. > > > If you mean the removal of check in FcConfigAddFontDir(), feel free to > revert that particular hunk. It got removed just to take the original > behavior back - i.e. to keep 100% compatibility with older versions.What I''ve committed doesn''t directly modify FcConfigAddFontDir, but changes FcDirScanConfig back to its previous behaviour: if it can''t normalize a directory, it scans anyway. Probably we should make sure that no such dir is cached, in fccache and fc-cache. pat
Patrick Lam
2006-Feb-09 07:37 UTC
[Fontconfig] fontconfig: FcConfigAppFontAddDir () doesn''t work right
Takashi Iwai wrote:> At Wed, 08 Feb 2006 00:10:18 -0500, > Patrick Lam wrote: > >>Takashi Iwai wrote: >> >>>At Tue, 07 Feb 2006 17:03:30 -0500, >>>Patrick Lam wrote: >>> >>> >>>>Mike FABIAN wrote: >>>> >>>> >>>>>See >>>>> >>>>>http://bugzilla.novell.com/show_bug.cgi?id=148693 >>>> >>>>I''m kind of concerned about this patch potentially bringing back the >>>>issues we had a while back with ''fc-cache .'' not doing the right thing, >>>>so I can''t commit it until I check that issue out. In particular, if we >>>>don''t normalize before we add a directory, it seems like fc-cache . >>>>might do the wrong thing. >>> >>> >>>If you mean the removal of check in FcConfigAddFontDir(), feel free to >>>revert that particular hunk. It got removed just to take the original >>>behavior back - i.e. to keep 100% compatibility with older versions. >> >>What I''ve committed doesn''t directly modify FcConfigAddFontDir, but >>changes FcDirScanConfig back to its previous behaviour: if it can''t >>normalize a directory, it scans anyway. > > > I think that''s the essential part of that patch. > The directory scanned is not listed in the config list since it''s > called from FcConfigAppFontAddDir().I think we agree. Please check to see if there''s anything you notice to be missing from this patch; things seem to work on this front for me. pat
Mike FABIAN
2006-Feb-10 08:11 UTC
[Fontconfig] Re: fontconfig: FcConfigAppFontAddDir () doesn''t work right
Patrick Lam <plam@MIT.EDU> ????????:> Mike FABIAN wrote: >> See >> >> http://bugzilla.novell.com/show_bug.cgi?id=148693 > > I''m kind of concerned about this patch potentially bringing back the > issues we had a while back with ''fc-cache .'' not doing the right thing, > so I can''t commit it until I check that issue out. In particular, if we > don''t normalize before we add a directory, it seems like fc-cache . > might do the wrong thing.In the CVS checkout from today some hunks of Takashi''s patch are included, but not all. Without the missing hunks it still doesn''t work, my test program from http://bugzilla.novell.com/show_bug.cgi?id=148693 comment #3 still runs into an endless loop with the test-case from comment #4 of that bug report. The remaining hunks of Takashi''s patch are attached. Actually the very last hunk: diff -ru fontconfig-2.3.93.20060210.orig/src/fcdir.c fontconfig-2.3.93.20060210/src/fcdir.c --- fontconfig-2.3.93.20060210.orig/src/fcdir.c 2006-02-10 13:06:08.000000000 +0100 +++ fontconfig-2.3.93.20060210/src/fcdir.c 2006-02-10 16:35:30.000000000 +0100 @@ -133,6 +133,8 @@ d_can = FcConfigNormalizeFontDir (config, dir); if (d_can) dir = d_can; + else + FcConfigAddFontDir (config, dir); if (!force) { is not necessary, it works without this hunk. But this hunk seems logical to me, probably it is better to include this as well. -------------- next part -------------- A non-text attachment was scrubbed... Name: fc-app-dir-fix-new-new.diff Type: text/x-patch Size: 1994 bytes Desc: not available Url : http://lists.freedesktop.org/archives/fontconfig/attachments/20060210/216b2af8/fc-app-dir-fix-new-new.bin -------------- next part -------------- -- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian ?????????????