From 384542fa915b27285ec22d899c4aa19be8c275f1 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 13 Feb 2009 16:41:37 -0800 Subject: [PATCH] [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) --- src/fcformat.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.39.5