]> git.wh0rd.org - fontconfig.git/blame - doc/fccharset.fncs
Don't use FcCharSetCopy in FcCharSetMerge
[fontconfig.git] / doc / fccharset.fncs
CommitLineData
bfc2dc3a 1/*
e690fbb2 2 * fontconfig/doc/fccharset.fncs
bfc2dc3a 3 *
46b51147 4 * Copyright © 2003 Keith Packard
bfc2dc3a
KP
5 *
6 * Permission to use, copy, modify, distribute, and sell this software and its
7 * documentation for any purpose is hereby granted without fee, provided that
8 * the above copyright notice appear in all copies and that both that
9 * copyright notice and this permission notice appear in supporting
10 * documentation, and that the name of Keith Packard not be used in
11 * advertising or publicity pertaining to distribution of the software without
12 * specific, written prior permission. Keith Packard makes no
13 * representations about the suitability of this software for any purpose. It
14 * is provided "as is" without express or implied warranty.
15 *
16 * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18 * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22 * PERFORMANCE OF THIS SOFTWARE.
23 */
22671e25
KP
24@RET@ FcCharSet *
25@FUNC@ FcCharSetCreate
26@TYPE1@ void
27@PURPOSE@ Create an empty character set
28@DESC@
29<function>FcCharSetCreate</function> allocates and initializes a new empty
30character set object.
31@@
32
33@RET@ void
34@FUNC@ FcCharSetDestroy
35@TYPE1@ FcCharSet * @ARG1@ fcs
36@PURPOSE@ Destroy a character set
37@DESC@
38<function>FcCharSetDestroy</function> decrements the reference count
39<parameter>fcs</parameter>. If the reference count becomes zero, all
40memory referenced is freed.
41@@
42
43@RET@ FcBool
44@FUNC@ FcCharSetAddChar
45@TYPE1@ FcCharSet * @ARG1@ fcs
61895ed1 46@TYPE2@ FcChar32% @ARG2@ ucs4
22671e25
KP
47@PURPOSE@ Add a character to a charset
48@DESC@
49<function>FcCharSetAddChar</function> adds a single unicode char to the set,
50returning FcFalse on failure, either as a result of a constant set or from
51running out of memory.
52@@
53
54@RET@ FcCharSet *
55@FUNC@ FcCharSetCopy
56@TYPE1@ FcCharSet * @ARG1@ src
57@PURPOSE@ Copy a charset
58@DESC@
59Makes a copy of <parameter>src</parameter>; note that this may not actually do anything more
60than increment the reference count on <parameter>src</parameter>.
61@@
62
63@RET@ FcBool
64@FUNC@ FcCharSetEqual
65@TYPE1@ const FcCharSet * @ARG1@ a
66@TYPE2@ const FcCharSet * @ARG2@ b
67@PURPOSE@ Compare two charsets
68@DESC@
69Returns whether <parameter>a</parameter> and <parameter>b</parameter>
70contain the same set of unicode chars.
71@@
72
73@RET@ FcCharSet *
74@FUNC@ FcCharSetIntersect
75@TYPE1@ const FcCharSet * @ARG1@ a
76@TYPE2@ const FcCharSet * @ARG2@ b
77@PURPOSE@ Intersect charsets
78@DESC@
79Returns a set including only those chars found in both
80<parameter>a</parameter> and <parameter>b</parameter>.
81@@
82
83@RET@ FcCharSet *
84@FUNC@ FcCharSetUnion
85@TYPE1@ const FcCharSet * @ARG1@ a
86@TYPE2@ const FcCharSet * @ARG2@ b
87@PURPOSE@ Add charsets
88@DESC@
89Returns a set including only those chars found in either <parameter>a</parameter> or <parameter>b</parameter>.
90@@
91
92@RET@ FcCharSet *
93@FUNC@ FcCharSetSubtract
94@TYPE1@ const FcCharSet * @ARG1@ a
95@TYPE2@ const FcCharSet * @ARG2@ b
96@PURPOSE@ Subtract charsets
97@DESC@
98Returns a set including only those chars found in <parameter>a</parameter> but not <parameter>b</parameter>.
99@@
100
d230cf14
BE
101@RET@ FcCharSet *
102@FUNC@ FcCharSetMerge
103@TYPE1@ const FcCharSet * @ARG1@ a
104@TYPE2@ const FcCharSet * @ARG2@ b
105@PURPOSE@ Merge charsets
106@DESC@
25a09eb9 107If <parameter>a</parameter> is NULL, returns a newly-created copy of <parameter>b</parameter>.
d230cf14
BE
108If <parameter>a</parameter> is an FcCharSet object owned by fontconfig that
109cannot be modified, it returns the union of <parameter>a</parameter> and
110<parameter>b</parameter> in a newly-created FcCharSet object.
111Otherwise, adds all chars in <parameter>b</parameter> to <parameter>a</parameter> and returns <parameter>a</parameter>. In other words, this is an in-place versionof FcCharSetUnion.
112@@
113
22671e25
KP
114@RET@ FcBool
115@FUNC@ FcCharSetHasChar
116@TYPE1@ const FcCharSet * @ARG1@ fcs
61895ed1 117@TYPE2@ FcChar32% @ARG2@ ucs4
22671e25
KP
118@PURPOSE@ Check a charset for a char
119@DESC@
120Returns whether <parameter>fcs</parameter> contains the char <parameter>ucs4</parameter>.
121@@
122
123@RET@ FcChar32
124@FUNC@ FcCharSetCount
125@TYPE1@ const FcCharSet * @ARG1@ a
126@PURPOSE@ Count entries in a charset
127@DESC@
128Returns the total number of unicode chars in <parameter>a</parameter>.
129@@
130
131@RET@ FcChar32
132@FUNC@ FcCharSetIntersectCount
133@TYPE1@ const FcCharSet * @ARG1@ a
134@TYPE2@ const FcCharSet * @ARG2@ b
135@PURPOSE@ Intersect and count charsets
136@DESC@
137Returns the number of chars that are in both <parameter>a</parameter> and <parameter>b</parameter>.
138@@
139
140@RET@ FcChar32
141@FUNC@ FcCharSetSubtractCount
142@TYPE1@ const FcCharSet * @ARG1@ a
143@TYPE2@ const FcCharSet * @ARG2@ b
144@PURPOSE@ Subtract and count charsets
145@DESC@
146Returns the number of chars that are in <parameter>a</parameter> but not in <parameter>b</parameter>.
147@@
148
149@RET@ FcBool
150@FUNC@ FcCharSetIsSubset
151@TYPE1@ const FcCharSet * @ARG1@ a
152@TYPE2@ const FcCharSet * @ARG2@ b
153@PURPOSE@ Test for charset inclusion
154@DESC@
155Returns whether <parameter>a</parameter> is a subset of <parameter>b</parameter>.
156@@
157
158@RET@ FcChar32
159@FUNC@ FcCharSetFirstPage
160@TYPE1@ const FcCharSet * @ARG1@ a
61895ed1 161@TYPE2@ FcChar32[FC_CHARSET_MAP_SIZE]% @ARG2@ map
22671e25
KP
162@TYPE3@ FcChar32 * @ARG3@ next
163@PURPOSE@ Start enumerating charset contents
164@DESC@
165Builds an array of bits marking the first page of Unicode coverage of
166<parameter>a</parameter>. Returns the base of the array. <parameter>next</parameter> contains the next page in the
167font.
168@@
169
170@RET@ FcChar32
171@FUNC@ FcCharSetNextPage
172@TYPE1@ const FcCharSet * @ARG1@ a
61895ed1 173@TYPE2@ FcChar32[FC_CHARSET_MAP_SIZE]% @ARG2@ map
22671e25
KP
174@TYPE3@ FcChar32 * @ARG3@ next
175@PURPOSE@ Continue enumerating charset contents
176@DESC@
177Builds an array of bits marking the Unicode coverage of <parameter>a</parameter> for page
178<parameter>*next</parameter>. Returns the base of the array. <parameter>next</parameter> contains the next page in
179the font.
180@@
a190678e
KP
181
182@RET@ FcChar32
183@FUNC@ FcCharSetCoverage
184@TYPE1@ const FcCharSet * @ARG1@ a
185@TYPE2@ FcChar32 @ARG2@ page
186@TYPE3@ FcChar32[8] @ARG3@ result
187@PURPOSE@ DEPRECATED return coverage for a Unicode page
188@DESC@
189DEPRECATED
190This function returns a bitmask in <parameter>result</parameter> which
191indicates which code points in
192<parameter>page</parameter> are included in <parameter>a</parameter>.
193<function>FcCharSetCoverage</function> returns the next page in the charset which has any
194coverage.
195@@
196
197@RET@ FcCharSet *
198@FUNC@ FcCharSetNew
199@TYPE1@ void
200@PURPOSE@ DEPRECATED alias for FcCharSetCreate
201@DESC@
202<function>FcCharSetNew</function> is a DEPRECATED alias for FcCharSetCreate.
203@@
204