+2006-01-06 Patrick Lam <plam@mit.edu>
+ * src/fcdbg.c (FcPatternPrint):
+
+ Print out full pathname in fc-match -v as well. Reported by
+ Frederic Crozat.
+
+2006-01-06 Mike Fabian <mfabian@suse.de>
+ reviewed by: plam
+
+ * src/fcname.c (FcNameParse):
+
+ Fix bug where fc-match crashes when given __DUMMY__ property to
+ match on.
+
+ (I added the __DUMMY__ string to enable callers of
+ FcObjectToPtrLookup to distinguish an error return from a
+ successful return. -PL)
+
2006-01-05 Patrick Lam <plam@mit.edu>
* AUTHORS:
{
e = FcPatternEltU(p->elts) + i;
printf ("\t%s:", FcObjectPtrU(e->object));
- FcValueListPrint (e->values);
+ /* so that fc-match properly displays file: foo... */
+ if (e->object == FcObjectToPtr(FC_FILE))
+ {
+ FcChar8 * s;
+ FcPatternGetString (p, FC_FILE, 0, &s);
+ printf (" \"%s\"", s);
+ switch (FcValueListPtrU(e->values)->binding) {
+ case FcValueBindingWeak:
+ printf ("(w)");
+ break;
+ case FcValueBindingStrong:
+ printf ("(s)");
+ break;
+ case FcValueBindingSame:
+ printf ("(=)");
+ break;
+ }
+ }
+ else
+ FcValueListPrint (e->values);
printf ("\n");
}
printf ("\n");
#include "fcint.h"
/* Please do not revoke any of these bindings. */
+/* The __DUMMY__ object enables callers to distinguish the error return
+ * of FcObjectToPtrLookup from FC_FAMILY's FcObjectPtr, which would
+ * otherwise be 0. */
static const FcObjectType _FcBaseObjectTypes[] = {
- { "__DUMMY__", FcTypeVoid, },
+ { "__DUMMY__", FcTypeVoid, },
{ FC_FAMILY, FcTypeString, },
{ FC_FAMILYLANG, FcTypeString, },
{ FC_STYLE, FcTypeString, },
}
}
- /* We didn't match. Look for the correct FcObjectTypeList
- * to replace it in-place. */
+ /* We didn't match. Look for the application's FcObjectTypeList
+ * and replace it in-place. */
for (l = _FcObjectTypes; l; l = l->next)
{
if (l->types == _FcUserObjectNames)
for (;;)
{
name = FcNameFindNext (name, ":,", save, &delim);
- if (t)
+ if (t && strcmp (t->object, _FcBaseObjectTypes[0].object))
{
v = FcNameConvert (t->type, save, &m);
if (!FcPatternAdd (pat, t->object, v, FcTrue))