From: Behdad Esfahbod Date: Sat, 14 Feb 2009 00:41:37 +0000 (-0800) Subject: [fcformat] Add a 'pkgkit' builtin that prints tags for font packages X-Git-Tag: 2.7.0~81 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=384542fa915b27285ec22d899c4aa19be8c275f1;p=fontconfig.git [fcformat] Add a 'pkgkit' builtin that prints tags for font packages For DejaVu Sans Condensed it generates: font(dejavusans) font(dejavusanscondensed) font(:lang=aa) font(:lang=ab) ... font(:lang=yo) font(:lang=zu) --- diff --git a/src/fcformat.c b/src/fcformat.c index 77c502d..ee7796a 100644 --- a/src/fcformat.c +++ b/src/fcformat.c @@ -38,6 +38,7 @@ #define FCMATCH_FORMAT "%{file:-|basename}: \"%{family[0]:-}\" \"%{style[0]:-}\"" #define FCLIST_FORMAT "%{?file{%{file}: }}%{=unparse}" +#define PKGKIT_FORMAT "%{[]family{font(%{family|downcase|delete( )})\n}}%{[]lang{font(:lang=%{lang|downcase|translate(_,-)})\n}}" static void @@ -267,6 +268,7 @@ interpret_builtin (FcFormatContext *c, ret = FcPatternFormatToBuf (pat, (const FcChar8 *) format, buf) BUILTIN ("fcmatch", FCMATCH_FORMAT); BUILTIN ("fclist", FCLIST_FORMAT); + BUILTIN ("pkgkit", PKGKIT_FORMAT); #undef BUILTIN else ret = FcFalse;