]> git.wh0rd.org - fontconfig.git/blob - doc/fccharset.fncs
b12064a5533eac3a326860b6be5156e80eba5bf9
[fontconfig.git] / doc / fccharset.fncs
1 /*
2 * fontconfig/doc/fccharset.fncs
3 *
4 * Copyright © 2003 Keith Packard
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 * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18 * EVENT SHALL THE AUTHOR(S) 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 */
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
30 character 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
40 memory referenced is freed.
41 @@
42
43 @RET@ FcBool
44 @FUNC@ FcCharSetAddChar
45 @TYPE1@ FcCharSet * @ARG1@ fcs
46 @TYPE2@ FcChar32% @ARG2@ ucs4
47 @PURPOSE@ Add a character to a charset
48 @DESC@
49 <function>FcCharSetAddChar</function> adds a single unicode char to the set,
50 returning FcFalse on failure, either as a result of a constant set or from
51 running out of memory.
52 @@
53
54 @RET@ FcCharSet *
55 @FUNC@ FcCharSetCopy
56 @TYPE1@ FcCharSet * @ARG1@ src
57 @PURPOSE@ Copy a charset
58 @DESC@
59 Makes a copy of <parameter>src</parameter>; note that this may not actually do anything more
60 than 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@
69 Returns whether <parameter>a</parameter> and <parameter>b</parameter>
70 contain 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@
79 Returns 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@
89 Returns 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@
98 Returns a set including only those chars found in <parameter>a</parameter> but not <parameter>b</parameter>.
99 @@
100
101 @RET@ FcBool
102 @FUNC@ FcCharSetMerge
103 @TYPE1@ FcCharSet * @ARG1@ a
104 @TYPE2@ const FcCharSet * @ARG2@ b
105 @TYPE3@ FcBool * @ARG3@ changed
106 @PURPOSE@ Merge charsets
107 @DESC@
108 Adds all chars in <parameter>b</parameter> to <parameter>a</parameter>.
109 In other words, this is an in-place version of FcCharSetUnion.
110 If <parameter>changed</parameter> is not NULL, then it returns whether any new
111 chars from <parameter>b</parameter> were added to <parameter>a</parameter>.
112 Returns FcFalse on failure, either when <parameter>a</parameter> is a constant
113 set or from running out of memory.
114 @@
115
116 @RET@ FcBool
117 @FUNC@ FcCharSetHasChar
118 @TYPE1@ const FcCharSet * @ARG1@ fcs
119 @TYPE2@ FcChar32% @ARG2@ ucs4
120 @PURPOSE@ Check a charset for a char
121 @DESC@
122 Returns whether <parameter>fcs</parameter> contains the char <parameter>ucs4</parameter>.
123 @@
124
125 @RET@ FcChar32
126 @FUNC@ FcCharSetCount
127 @TYPE1@ const FcCharSet * @ARG1@ a
128 @PURPOSE@ Count entries in a charset
129 @DESC@
130 Returns the total number of unicode chars in <parameter>a</parameter>.
131 @@
132
133 @RET@ FcChar32
134 @FUNC@ FcCharSetIntersectCount
135 @TYPE1@ const FcCharSet * @ARG1@ a
136 @TYPE2@ const FcCharSet * @ARG2@ b
137 @PURPOSE@ Intersect and count charsets
138 @DESC@
139 Returns the number of chars that are in both <parameter>a</parameter> and <parameter>b</parameter>.
140 @@
141
142 @RET@ FcChar32
143 @FUNC@ FcCharSetSubtractCount
144 @TYPE1@ const FcCharSet * @ARG1@ a
145 @TYPE2@ const FcCharSet * @ARG2@ b
146 @PURPOSE@ Subtract and count charsets
147 @DESC@
148 Returns the number of chars that are in <parameter>a</parameter> but not in <parameter>b</parameter>.
149 @@
150
151 @RET@ FcBool
152 @FUNC@ FcCharSetIsSubset
153 @TYPE1@ const FcCharSet * @ARG1@ a
154 @TYPE2@ const FcCharSet * @ARG2@ b
155 @PURPOSE@ Test for charset inclusion
156 @DESC@
157 Returns whether <parameter>a</parameter> is a subset of <parameter>b</parameter>.
158 @@
159
160 @RET@ FcChar32
161 @FUNC@ FcCharSetFirstPage
162 @TYPE1@ const FcCharSet * @ARG1@ a
163 @TYPE2@ FcChar32[FC_CHARSET_MAP_SIZE]% @ARG2@ map
164 @TYPE3@ FcChar32 * @ARG3@ next
165 @PURPOSE@ Start enumerating charset contents
166 @DESC@
167 Builds an array of bits marking the first page of Unicode coverage of
168 <parameter>a</parameter>. Returns the base of the array. <parameter>next</parameter> contains the next page in the
169 font.
170 @@
171
172 @RET@ FcChar32
173 @FUNC@ FcCharSetNextPage
174 @TYPE1@ const FcCharSet * @ARG1@ a
175 @TYPE2@ FcChar32[FC_CHARSET_MAP_SIZE]% @ARG2@ map
176 @TYPE3@ FcChar32 * @ARG3@ next
177 @PURPOSE@ Continue enumerating charset contents
178 @DESC@
179 Builds an array of bits marking the Unicode coverage of <parameter>a</parameter> for page
180 <parameter>*next</parameter>. Returns the base of the array. <parameter>next</parameter> contains the next page in
181 the font.
182 @@
183
184 @RET@ FcChar32
185 @FUNC@ FcCharSetCoverage
186 @TYPE1@ const FcCharSet * @ARG1@ a
187 @TYPE2@ FcChar32 @ARG2@ page
188 @TYPE3@ FcChar32[8] @ARG3@ result
189 @PURPOSE@ DEPRECATED return coverage for a Unicode page
190 @DESC@
191 DEPRECATED
192 This function returns a bitmask in <parameter>result</parameter> which
193 indicates which code points in
194 <parameter>page</parameter> are included in <parameter>a</parameter>.
195 <function>FcCharSetCoverage</function> returns the next page in the charset which has any
196 coverage.
197 @@
198
199 @RET@ FcCharSet *
200 @FUNC@ FcCharSetNew
201 @TYPE1@ void
202 @PURPOSE@ DEPRECATED alias for FcCharSetCreate
203 @DESC@
204 <function>FcCharSetNew</function> is a DEPRECATED alias for FcCharSetCreate.
205 @@
206