/*
* fontconfig/doc/fccharset.fncs
*
* Copyright © 2003 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of the author(s) not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. The authors make no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
@RET@ FcCharSet *
@FUNC@ FcCharSetCreate
@TYPE1@ void
@PURPOSE@ Create an empty character set
@DESC@
FcCharSetCreate allocates and initializes a new empty
character set object.
@@
@RET@ void
@FUNC@ FcCharSetDestroy
@TYPE1@ FcCharSet * @ARG1@ fcs
@PURPOSE@ Destroy a character set
@DESC@
FcCharSetDestroy decrements the reference count
fcs. If the reference count becomes zero, all
memory referenced is freed.
@@
@RET@ FcBool
@FUNC@ FcCharSetAddChar
@TYPE1@ FcCharSet * @ARG1@ fcs
@TYPE2@ FcChar32% @ARG2@ ucs4
@PURPOSE@ Add a character to a charset
@DESC@
FcCharSetAddChar adds a single Unicode char to the set,
returning FcFalse on failure, either as a result of a constant set or from
running out of memory.
@@
@RET@ FcBool
@FUNC@ FcCharSetDelChar
@TYPE1@ FcCharSet * @ARG1@ fcs
@TYPE2@ FcChar32% @ARG2@ ucs4
@PURPOSE@ Add a character to a charset
@DESC@
FcCharSetDelChar deletes a single Unicode char from the set,
returning FcFalse on failure, either as a result of a constant set or from
running out of memory.
@@
@RET@ FcCharSet *
@FUNC@ FcCharSetCopy
@TYPE1@ FcCharSet * @ARG1@ src
@PURPOSE@ Copy a charset
@DESC@
Makes a copy of src; note that this may not actually do anything more
than increment the reference count on src.
@@
@RET@ FcBool
@FUNC@ FcCharSetEqual
@TYPE1@ const FcCharSet * @ARG1@ a
@TYPE2@ const FcCharSet * @ARG2@ b
@PURPOSE@ Compare two charsets
@DESC@
Returns whether a and b
contain the same set of Unicode chars.
@@
@RET@ FcCharSet *
@FUNC@ FcCharSetIntersect
@TYPE1@ const FcCharSet * @ARG1@ a
@TYPE2@ const FcCharSet * @ARG2@ b
@PURPOSE@ Intersect charsets
@DESC@
Returns a set including only those chars found in both
a and b.
@@
@RET@ FcCharSet *
@FUNC@ FcCharSetUnion
@TYPE1@ const FcCharSet * @ARG1@ a
@TYPE2@ const FcCharSet * @ARG2@ b
@PURPOSE@ Add charsets
@DESC@
Returns a set including only those chars found in either a or b.
@@
@RET@ FcCharSet *
@FUNC@ FcCharSetSubtract
@TYPE1@ const FcCharSet * @ARG1@ a
@TYPE2@ const FcCharSet * @ARG2@ b
@PURPOSE@ Subtract charsets
@DESC@
Returns a set including only those chars found in a but not b.
@@
@RET@ FcBool
@FUNC@ FcCharSetMerge
@TYPE1@ FcCharSet * @ARG1@ a
@TYPE2@ const FcCharSet * @ARG2@ b
@TYPE3@ FcBool * @ARG3@ changed
@PURPOSE@ Merge charsets
@DESC@
Adds all chars in b to a.
In other words, this is an in-place version of FcCharSetUnion.
If changed is not NULL, then it returns whether any new
chars from b were added to a.
Returns FcFalse on failure, either when a is a constant
set or from running out of memory.
@@
@RET@ FcBool
@FUNC@ FcCharSetHasChar
@TYPE1@ const FcCharSet * @ARG1@ fcs
@TYPE2@ FcChar32% @ARG2@ ucs4
@PURPOSE@ Check a charset for a char
@DESC@
Returns whether fcs contains the char ucs4.
@@
@RET@ FcChar32
@FUNC@ FcCharSetCount
@TYPE1@ const FcCharSet * @ARG1@ a
@PURPOSE@ Count entries in a charset
@DESC@
Returns the total number of Unicode chars in a.
@@
@RET@ FcChar32
@FUNC@ FcCharSetIntersectCount
@TYPE1@ const FcCharSet * @ARG1@ a
@TYPE2@ const FcCharSet * @ARG2@ b
@PURPOSE@ Intersect and count charsets
@DESC@
Returns the number of chars that are in both a and b.
@@
@RET@ FcChar32
@FUNC@ FcCharSetSubtractCount
@TYPE1@ const FcCharSet * @ARG1@ a
@TYPE2@ const FcCharSet * @ARG2@ b
@PURPOSE@ Subtract and count charsets
@DESC@
Returns the number of chars that are in a but not in b.
@@
@RET@ FcBool
@FUNC@ FcCharSetIsSubset
@TYPE1@ const FcCharSet * @ARG1@ a
@TYPE2@ const FcCharSet * @ARG2@ b
@PURPOSE@ Test for charset inclusion
@DESC@
Returns whether a is a subset of b.
@@
@RET@ FcChar32
@FUNC@ FcCharSetFirstPage
@TYPE1@ const FcCharSet * @ARG1@ a
@TYPE2@ FcChar32[FC_CHARSET_MAP_SIZE]% @ARG2@ map
@TYPE3@ FcChar32 * @ARG3@ next
@PURPOSE@ Start enumerating charset contents
@DESC@
Builds an array of bits in map marking the
first page of Unicode coverage of a.
*next is set to contains the base code point
for the next page in a. Returns the base code
point for the page, or FC_CHARSET_DONE if
a contains no pages. As an example, if
FcCharSetFirstPage returns
0x300 and fills map with
0xffffffff 0xffffffff 0x01000008 0x44300002 0xffffd7f0 0xfffffffb 0xffff7fff 0xffff0003
Then the page contains code points 0x300 through
0x33f (the first 64 code points on the page)
because map[0] and
map[1] both have all their bits set. It also
contains code points 0x343 (0x300 + 32*2
+ (4-1)) and 0x35e (0x300 +
32*2 + (31-1)) because map[2] has
the 4th and 31st bits set. The code points represented by
map[3] and later are left as an excercise for the
reader ;).
@@
@RET@ FcChar32
@FUNC@ FcCharSetNextPage
@TYPE1@ const FcCharSet * @ARG1@ a
@TYPE2@ FcChar32[FC_CHARSET_MAP_SIZE]% @ARG2@ map
@TYPE3@ FcChar32 * @ARG3@ next
@PURPOSE@ Continue enumerating charset contents
@DESC@
Builds an array of bits in map marking the
Unicode coverage of a for page containing
*next (see the
FcCharSetFirstPage description for details).
*next is set to contains the base code point
for the next page in a. Returns the base of
code point for the page, or FC_CHARSET_DONE if
a does not contain
*next.
@@
@RET@ FcChar32
@FUNC@ FcCharSetCoverage
@TYPE1@ const FcCharSet * @ARG1@ a
@TYPE2@ FcChar32 @ARG2@ page
@TYPE3@ FcChar32[8] @ARG3@ result
@PURPOSE@ DEPRECATED return coverage for a Unicode page
@DESC@
DEPRECATED
This function returns a bitmask in result which
indicates which code points in
page are included in a.
FcCharSetCoverage returns the next page in the charset which has any
coverage.
@@
@RET@ FcCharSet *
@FUNC@ FcCharSetNew
@TYPE1@ void
@PURPOSE@ DEPRECATED alias for FcCharSetCreate
@DESC@
FcCharSetNew is a DEPRECATED alias for FcCharSetCreate.
@@