Output langsets and all bindings in debug messages
This commit is contained in:
parent
b2b6903259
commit
602e6b1f26
21
src/fcdbg.c
21
src/fcdbg.c
|
@ -29,6 +29,9 @@
|
||||||
void
|
void
|
||||||
FcValuePrint (const FcValue v)
|
FcValuePrint (const FcValue v)
|
||||||
{
|
{
|
||||||
|
FcStrBuf buf;
|
||||||
|
FcChar8 init_buf[1024];
|
||||||
|
|
||||||
switch (v.type) {
|
switch (v.type) {
|
||||||
case FcTypeVoid:
|
case FcTypeVoid:
|
||||||
printf (" <void>");
|
printf (" <void>");
|
||||||
|
@ -52,7 +55,12 @@ FcValuePrint (const FcValue v)
|
||||||
printf (" set");
|
printf (" set");
|
||||||
break;
|
break;
|
||||||
case FcTypeLangSet:
|
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;
|
break;
|
||||||
case FcTypeFTFace:
|
case FcTypeFTFace:
|
||||||
printf (" face");
|
printf (" face");
|
||||||
|
@ -66,8 +74,17 @@ FcValueListPrint (const FcValueList *l)
|
||||||
for (; l; l = l->next)
|
for (; l; l = l->next)
|
||||||
{
|
{
|
||||||
FcValuePrint (l->value);
|
FcValuePrint (l->value);
|
||||||
if (l->binding == FcValueBindingWeak)
|
switch (l->binding) {
|
||||||
|
case FcValueBindingWeak:
|
||||||
printf ("(w)");
|
printf ("(w)");
|
||||||
|
break;
|
||||||
|
case FcValueBindingStrong:
|
||||||
|
printf ("(s)");
|
||||||
|
break;
|
||||||
|
case FcValueBindingSame:
|
||||||
|
printf ("(=)");
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue