From: Keith Packard Date: Wed, 12 Feb 2003 18:21:21 +0000 (+0000) Subject: Output langsets and all bindings in debug messages X-Git-Tag: fc-2_1_91~29 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=602e6b1f265b17cc1059a01ac98f0877fb7d1db8;p=fontconfig.git Output langsets and all bindings in debug messages --- diff --git a/src/fcdbg.c b/src/fcdbg.c index e519d10..055a8bf 100644 --- a/src/fcdbg.c +++ b/src/fcdbg.c @@ -29,6 +29,9 @@ void FcValuePrint (const FcValue v) { + FcStrBuf buf; + FcChar8 init_buf[1024]; + switch (v.type) { case FcTypeVoid: printf (" "); @@ -52,7 +55,12 @@ FcValuePrint (const FcValue v) printf (" set"); break; case FcTypeLangSet: - printf (" langset"); + FcStrBufInit (&buf, init_buf, sizeof (init_buf)); + if (FcNameUnparseLangSet (&buf, v.u.l) && FcStrBufChar (&buf,'\0')) + printf (" %s", buf.buf); + else + printf ("langset (alloc error)"); + FcStrBufDestroy (&buf); break; case FcTypeFTFace: printf (" face"); @@ -66,8 +74,17 @@ FcValueListPrint (const FcValueList *l) for (; l; l = l->next) { FcValuePrint (l->value); - if (l->binding == FcValueBindingWeak) + switch (l->binding) { + case FcValueBindingWeak: printf ("(w)"); + break; + case FcValueBindingStrong: + printf ("(s)"); + break; + case FcValueBindingSame: + printf ("(=)"); + break; + } } }