if (quiet && !os)
os = FcObjectSetCreate ();
if (!verbose && !format && !os)
- os = FcObjectSetBuild (FC_FAMILY, FC_STYLE, (char *) 0);
+ os = FcObjectSetBuild (FC_FAMILY, FC_STYLE, FC_FILE, (char *) 0);
+ if (!format)
+ format = "%{=fclist}\n";
fs = FcFontList (0, pat, os);
if (os)
FcObjectSetDestroy (os);
{
FcPatternPrint (fs->fonts[j]);
}
- else if (format)
+ else
{
FcChar8 *s;
free (s);
}
}
- else
- {
- FcChar8 *str;
- FcChar8 *file;
-
- str = FcNameUnparse (fs->fonts[j]);
- if (FcPatternGetString (fs->fonts[j], FC_FILE, 0, &file) == FcResultMatch)
- printf ("%s: ", file);
- printf ("%s\n", str);
- free (str);
- }
}
}
#define FCMATCH_FORMAT "%{file:-<unknown filename>|basename}: \"%{family[0]:-<unknown family>}\" \"%{style[0]:-<unknown style>}\""
-#define FCLIST_FORMAT "%{?file{%{file}: }}%{=unparse}"
+#define FCLIST_FORMAT "%{?file{%{file}: }}%{-file{%{=unparse}}}"
#define PKGKIT_FORMAT "%{[]family{font(%{family|downcase|delete( )})\n}}%{[]lang{font(:lang=%{lang|downcase|translate(_,-)})\n}}"
{
o = &l->types[i];
if (!strcmp (o->object, FC_FAMILY) ||
- !strcmp (o->object, FC_SIZE) ||
- !strcmp (o->object, FC_FILE))
+ !strcmp (o->object, FC_SIZE))
continue;
e = FcPatternObjectFindElt (pat, FcObjectFromName (o->object));