Behdad Esfahbod
2005-Dec-05 01:26 UTC
[Fontconfig] Warning when editing a nonexistant key?
Hi, I''m getting this warning: Fontconfig warning: "/home/behdad/.local/etc/fonts/conf.d/10-fonts-persian.conf" , line 444: saw bool, expected void The relevant lines are: <edit name="rh_prefer_bitmaps"> <bool>false</bool> </edit> which is probably since the key "rh_prefer_bitmaps" doesn''t exist in the pattern. Am I doing something silly here, or fontconfig should learn to not warn here? BTW, Pat found the bug causing the memory issue. --behdad http://behdad.org/ "Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill" -- Dan Bern, "New American Language"
Behdad Esfahbod wrote:> Hi, > > I''m getting this warning: > > Fontconfig warning: > "/home/behdad/.local/etc/fonts/conf.d/10-fonts-persian.conf" , > line 444: saw bool, expected void > > > The relevant lines are: > > <edit name="rh_prefer_bitmaps"> > <bool>false</bool> > </edit> > > which is probably since the key "rh_prefer_bitmaps" doesn''t exist > in the pattern. Am I doing something silly here, or fontconfig > should learn to not warn here?Try this: Index: src/fcname.c ==================================================================RCS file: /cvs/fontconfig/fontconfig/src/fcname.c,v retrieving revision 1.27.4.14 diff -u -p -r1.27.4.14 fcname.c --- src/fcname.c 25 Nov 2005 15:50:34 -0000 1.27.4.14 +++ src/fcname.c 5 Dec 2005 16:14:53 -0000 @@ -155,6 +155,9 @@ FcNameGetObjectType (const char *object) for (l = _FcObjectTypes; l; l = l->next) { + if (l == (FcObjectTypeList*)_FcUserObjectNames) + continue; + for (i = 0; i < l->ntypes; i++) { t = &l->types[i]; pat