diff options
Diffstat (limited to 'src/fccharset.c')
-rw-r--r-- | src/fccharset.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/fccharset.c b/src/fccharset.c index 4652309a..c764c43e 100644 --- a/src/fccharset.c +++ b/src/fccharset.c @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/fontconfig/src/fccharset.c,v 1.2 2002/02/15 06:01:28 keithp Exp $ + * $XFree86: xc/lib/fontconfig/src/fccharset.c,v 1.3 2002/02/18 22:29:28 keithp Exp $ * * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc. * @@ -557,6 +557,27 @@ FcCharSetSubtractCount (const FcCharSet *a, const FcCharSet *b) return count; } +FcChar32 +FcCharSetCoverage (const FcCharSet *a, FcChar32 page, FcChar32 *result) +{ + FcCharSetIter ai; + + ai.ucs4 = page; + FcCharSetIterSet (a, &ai); + if (!ai.leaf) + { + memset (result, '\0', 256 / 8); + page = 0; + } + else + { + memcpy (result, ai.leaf->map, sizeof (ai.leaf->map)); + FcCharSetIterNext (a, &ai); + page = ai.ucs4; + } + return page; +} + /* * ASCII representation of charsets. * |