aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/doc/fccharset.fncs
blob: efcd0ccf15db51a0164c8a176c6927cb17bde79e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
/*
 * 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@
<function>FcCharSetCreate</function> allocates and initializes a new empty
character set object.
@@

@RET@		void
@FUNC@		FcCharSetDestroy
@TYPE1@		FcCharSet *		@ARG1@		fcs
@PURPOSE@	Destroy a character set
@DESC@
<function>FcCharSetDestroy</function> decrements the reference count 
<parameter>fcs</parameter>.  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@
<function>FcCharSetAddChar</function> 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@
<function>FcCharSetDelChar</function> 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 <parameter>src</parameter>; note that this may not actually do anything more
than increment the reference count on <parameter>src</parameter>. 
@@

@RET@		FcBool
@FUNC@		FcCharSetEqual
@TYPE1@		const FcCharSet *	@ARG1@		a
@TYPE2@		const FcCharSet *	@ARG2@		b
@PURPOSE@	Compare two charsets
@DESC@
Returns whether <parameter>a</parameter> and <parameter>b</parameter>
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
<parameter>a</parameter> and <parameter>b</parameter>. 
@@

@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 <parameter>a</parameter> or <parameter>b</parameter>. 
@@

@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 <parameter>a</parameter> but not <parameter>b</parameter>. 
@@

@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 <parameter>b</parameter> to <parameter>a</parameter>.
In other words, this is an in-place version of FcCharSetUnion.
If <parameter>changed</parameter> is not NULL, then it returns whether any new
chars from <parameter>b</parameter> were added to <parameter>a</parameter>.
Returns FcFalse on failure, either when <parameter>a</parameter> 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 <parameter>fcs</parameter> contains the char <parameter>ucs4</parameter>. 
@@

@RET@		FcChar32
@FUNC@		FcCharSetCount
@TYPE1@		const FcCharSet *	@ARG1@		a
@PURPOSE@	Count entries in a charset
@DESC@
Returns the total number of Unicode chars in <parameter>a</parameter>. 
@@

@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 <parameter>a</parameter> and <parameter>b</parameter>. 
@@

@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 <parameter>a</parameter> but not in <parameter>b</parameter>. 
@@

@RET@		FcBool
@FUNC@		FcCharSetIsSubset
@TYPE1@		const FcCharSet *	@ARG1@		a
@TYPE2@		const FcCharSet *	@ARG2@		b
@PURPOSE@	Test for charset inclusion
@DESC@
Returns whether <parameter>a</parameter> is a subset of <parameter>b</parameter>. 
@@

@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 <parameter>map</parameter> marking the
first page of Unicode coverage of <parameter>a</parameter>.
<parameter>*next</parameter> is set to contains the base code point
for the next page in <parameter>a</parameter>.  Returns the base code
point for the page, or <constant>FC_CHARSET_DONE</constant> if
<parameter>a</parameter> contains no pages.  As an example, if
<function>FcCharSetFirstPage</function> returns
<literal>0x300</literal> and fills <parameter>map</parameter> with
<literallayout class="monospaced">
0xffffffff 0xffffffff 0x01000008 0x44300002 0xffffd7f0 0xfffffffb 0xffff7fff 0xffff0003
</literallayout>
Then the page contains code points <literal>0x300</literal> through
<literal>0x33f</literal> (the first 64 code points on the page)
because <parameter>map[0]</parameter> and
<parameter>map[1]</parameter> both have all their bits set.  It also
contains code points <literal>0x343</literal> (<parameter>0x300 + 32*2
+ (4-1)</parameter>) and <literal>0x35e</literal> (<parameter>0x300 +
32*2 + (31-1)</parameter>) because <parameter>map[2]</parameter> has
the 4th and 31st bits set.  The code points represented by
<literal>map[3]</literal> 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 <parameter>map</parameter> marking the
Unicode coverage of <parameter>a</parameter> for page containing
<parameter>*next</parameter> (see the
<function>FcCharSetFirstPage</function> description for details).
<parameter>*next</parameter> is set to contains the base code point
for the next page in <parameter>a</parameter>.  Returns the base of
code point for the page, or <constant>FC_CHARSET_DONE</constant> if
<parameter>a</parameter> does not contain
<parameter>*next</parameter>.
@@

@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 <parameter>result</parameter> which
indicates which code points in
<parameter>page</parameter> are included in <parameter>a</parameter>.
<function>FcCharSetCoverage</function> returns the next page in the charset which has any
coverage.
@@

@RET@		FcCharSet *
@FUNC@		FcCharSetNew
@TYPE1@		void
@PURPOSE@	DEPRECATED alias for FcCharSetCreate
@DESC@
<function>FcCharSetNew</function> is a DEPRECATED alias for FcCharSetCreate.
@@