diff options
author | Keith Packard <keithp@keithp.com> | 2002-07-12 21:06:03 +0000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2002-07-12 21:06:03 +0000 |
commit | c80d2ac4866d4c534a8693d611ed85b84c11d009 (patch) | |
tree | 4f4d25770aa3552975156c824eafa09ab5d42d22 /src/fclang.c | |
parent | b4a2c1f012c9c05cd14e43544570371ba2ca1134 (diff) |
Clean up some coverage files; a few accidentally included PUA values and
punctuation. Add debugging stuff to dump out missing codepoints during
cache building when missing only a few
Diffstat (limited to 'src/fclang.c')
-rw-r--r-- | src/fclang.c | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/src/fclang.c b/src/fclang.c index 9795ec8..7a958b0 100644 --- a/src/fclang.c +++ b/src/fclang.c @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/fontconfig/fc-lang/fclang.tmpl.c,v 1.1 2002/07/06 23:21:36 keithp Exp $ + * $XFree86: xc/lib/fontconfig/src/fclang.c,v 1.3 2002/07/08 07:31:53 keithp Exp $ * * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. * @@ -60,7 +60,36 @@ FcFreeTypeSetLang (FcPattern *pattern, } missing = FcCharSetSubtractCount (&fcLangCharSets[i].charset, charset); if (FcDebug() & FC_DBG_SCANV) - printf ("%s(%d) ", fcLangCharSets[i].lang, missing); + { + if (missing && missing < 10) + { + FcCharSet *missed = FcCharSetSubtract (&fcLangCharSets[i].charset, + charset); + FcChar32 ucs4; + FcChar32 map[FC_CHARSET_MAP_SIZE]; + FcChar32 next; + + printf ("\n%s(%d) ", fcLangCharSets[i].lang, missing); + printf ("{"); + for (ucs4 = FcCharSetFirstPage (missed, map, &next); + ucs4 != FC_CHARSET_DONE; + ucs4 = FcCharSetNextPage (missed, map, &next)) + { + int i, j; + for (i = 0; i < FC_CHARSET_MAP_SIZE; i++) + if (map[i]) + { + for (j = 0; j < 32; j++) + if (map[i] & (1 << j)) + printf (" %04x", ucs4 + i * 32 + j); + } + } + printf (" }\n\t"); + FcCharSetDestroy (missed); + } + else + printf ("%s(%d) ", fcLangCharSets[i].lang, missing); + } if (!missing) { if (!FcPatternAddString (pattern, FC_LANG, fcLangCharSets[i].lang)) |