blob: 0da3568461b754d1b5079e0f536a8c48b82ad51c [file] [log] [blame]
Keith Packardbfc2dc32003-03-07 08:44:32 +00001/*
Behdad Esfahbode690fbb2008-08-13 03:30:23 -04002 * fontconfig/doc/fcpattern.fncs
Keith Packardbfc2dc32003-03-07 08:44:32 +00003 *
Keith Packard46b51142004-12-07 01:14:46 +00004 * Copyright © 2003 Keith Packard
Keith Packardbfc2dc32003-03-07 08:44:32 +00005 *
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
Behdad Esfahbod5aaf4662010-11-10 16:45:42 -050010 * documentation, and that the name of the author(s) not be used in
Keith Packardbfc2dc32003-03-07 08:44:32 +000011 * advertising or publicity pertaining to distribution of the software without
Behdad Esfahbod5aaf4662010-11-10 16:45:42 -050012 * specific, written prior permission. The authors make no
Keith Packardbfc2dc32003-03-07 08:44:32 +000013 * representations about the suitability of this software for any purpose. It
14 * is provided "as is" without express or implied warranty.
15 *
Behdad Esfahbod3074a732009-03-12 16:00:08 -040016 * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
Keith Packardbfc2dc32003-03-07 08:44:32 +000017 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
Behdad Esfahbod3074a732009-03-12 16:00:08 -040018 * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
Keith Packardbfc2dc32003-03-07 08:44:32 +000019 * 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 */
Akira TAGOHafe6e812022-12-13 16:05:41 +090024@RET@ FcPattern *
25@FUNC@ FcPatternCreate
26@TYPE1@ void
27@PURPOSE@ Create a pattern
Keith Packard22671e22003-03-07 07:12:51 +000028@DESC@
29Creates a pattern with no properties; used to build patterns from scratch.
30@@
31
Akira TAGOHafe6e812022-12-13 16:05:41 +090032@RET@ FcPattern *
33@FUNC@ FcPatternDuplicate
34@TYPE1@ const FcPattern * @ARG1@ p
35@PURPOSE@ Copy a pattern
Keith Packarda1906782007-11-03 22:23:28 -070036@DESC@
37Copy a pattern, returning a new pattern that matches
38<parameter>p</parameter>. Each pattern may be modified without affecting the
39other.
40@@
41
Akira TAGOHafe6e812022-12-13 16:05:41 +090042@RET@ void
43@FUNC@ FcPatternReference
44@TYPE1@ FcPattern * @ARG1@ p
45@PURPOSE@ Increment pattern reference count
Keith Packarda1906782007-11-03 22:23:28 -070046@DESC@
47Add another reference to <parameter>p</parameter>. Patterns are freed only
48when the reference count reaches zero.
49@@
50
Akira TAGOHafe6e812022-12-13 16:05:41 +090051@RET@ void
52@FUNC@ FcPatternDestroy
53@TYPE1@ FcPattern * @ARG1@ p
54@PURPOSE@ Destroy a pattern
Keith Packard22671e22003-03-07 07:12:51 +000055@DESC@
Keith Packarda1906782007-11-03 22:23:28 -070056Decrement the pattern reference count. If all references are gone, destroys
57the pattern, in the process destroying all related values.
Keith Packard22671e22003-03-07 07:12:51 +000058@@
59
Akira TAGOHafe6e812022-12-13 16:05:41 +090060@RET@ int
61@FUNC@ FcPatternObjectCount
62@TYPE1@ const FcPattern * @ARG1@ p
63@PURPOSE@ Returns the number of the object
Akira TAGOH307639c2018-05-11 20:48:30 +090064@DESC@
65Returns the number of the object <parameter>p</parameter> has.
Akira TAGOHafe6e812022-12-13 16:05:41 +090066@SINCE@ 2.13.1
Akira TAGOH307639c2018-05-11 20:48:30 +090067@@
68
Akira TAGOHafe6e812022-12-13 16:05:41 +090069@RET@ FcBool
70@FUNC@ FcPatternEqual
71@TYPE1@ const FcPattern * @ARG1@ pa
72@TYPE2@ const FcPattern * @ARG2@ pb
73@PURPOSE@ Compare patterns
Keith Packard22671e22003-03-07 07:12:51 +000074@DESC@
Keith Packard2df0c662003-03-07 08:51:14 +000075Returns whether <parameter>pa</parameter> and <parameter>pb</parameter> are exactly alike.
Keith Packard22671e22003-03-07 07:12:51 +000076@@
77
Akira TAGOHafe6e812022-12-13 16:05:41 +090078@RET@ FcBool
79@FUNC@ FcPatternEqualSubset
80@TYPE1@ const FcPattern * @ARG1@ pa
81@TYPE2@ const FcPattern * @ARG2@ pb
82@TYPE3@ const FcObjectSet * @ARG3@ os
83@PURPOSE@ Compare portions of patterns
Keith Packard22671e22003-03-07 07:12:51 +000084@DESC@
Keith Packard2df0c662003-03-07 08:51:14 +000085Returns whether <parameter>pa</parameter> and <parameter>pb</parameter> have exactly the same values for all of the
86objects in <parameter>os</parameter>.
Keith Packard22671e22003-03-07 07:12:51 +000087@@
88
Akira TAGOHafe6e812022-12-13 16:05:41 +090089@RET@ FcPattern *
90@FUNC@ FcPatternFilter
91@TYPE1@ FcPattern * @ARG1@ p
92@TYPE2@ const FcObjectSet * @ARG2@ os
93@PURPOSE@ Filter the objects of pattern
Behdad Esfahbod41fc0fe2008-08-13 02:50:35 -040094@DESC@
95Returns a new pattern that only has those objects from
96<parameter>p</parameter> that are in <parameter>os</parameter>.
97If <parameter>os</parameter> is NULL, a duplicate of
98<parameter>p</parameter> is returned.
99@@
100
Akira TAGOHafe6e812022-12-13 16:05:41 +0900101@RET@ FcChar32
102@FUNC@ FcPatternHash
103@TYPE1@ const FcPattern * @ARG1@ p
104@PURPOSE@ Compute a pattern hash value
Keith Packard22671e22003-03-07 07:12:51 +0000105@DESC@
106Returns a 32-bit number which is the same for any two patterns which are
107equal.
108@@
109
Akira TAGOHafe6e812022-12-13 16:05:41 +0900110@RET@ FcBool
111@FUNC@ FcPatternAdd
112@TYPE1@ FcPattern * @ARG1@ p
113@TYPE2@ const char * @ARG2@ object
114@TYPE3@ FcValue% @ARG3@ value
115@TYPE4@ FcBool% @ARG4@ append
116@PURPOSE@ Add a value to a pattern
Keith Packard22671e22003-03-07 07:12:51 +0000117@DESC@
118Adds a single value to the list of values associated with the property named
Keith Packard2df0c662003-03-07 08:51:14 +0000119`object<parameter>. If `append</parameter> is FcTrue, the value is added at the end of any
Brad Hards7baa20c2011-03-11 19:43:42 -0300120existing list, otherwise it is inserted at the beginning. `value' is saved
Keith Packard22671e22003-03-07 07:12:51 +0000121(with FcValueSave) when inserted into the pattern so that the library
122retains no reference to any application-supplied data structure.
123@@
124
Akira TAGOHafe6e812022-12-13 16:05:41 +0900125@RET@ FcBool
126@FUNC@ FcPatternAddWeak
127@TYPE1@ FcPattern * @ARG1@ p
128@TYPE2@ const char * @ARG2@ object
129@TYPE3@ FcValue% @ARG3@ value
130@TYPE4@ FcBool% @ARG4@ append
131@PURPOSE@ Add a value to a pattern with weak binding
Keith Packard22671e22003-03-07 07:12:51 +0000132@DESC@
133FcPatternAddWeak is essentially the same as FcPatternAdd except that any
Keith Packard2df0c662003-03-07 08:51:14 +0000134values added to the list have binding <parameter>weak</parameter> instead of <parameter>strong</parameter>.
Keith Packard22671e22003-03-07 07:12:51 +0000135@@
136
Akira TAGOHafe6e812022-12-13 16:05:41 +0900137@TITLE@ FcPatternAdd-Type
138@RET@ FcBool
139@FUNC@ FcPatternAddInteger
140@TYPE1@ FcPattern * @ARG1@ p
141@TYPE2@ const char * @ARG2@ object
142@TYPE3@ int% @ARG3@ i
Keith Packard22671e22003-03-07 07:12:51 +0000143
144@PROTOTYPE+@
Akira TAGOHafe6e812022-12-13 16:05:41 +0900145@RET+@ FcBool
146@FUNC+@ FcPatternAddDouble
147@TYPE1+@ FcPattern * @ARG1+@ p
148@TYPE2+@ const char * @ARG2+@ object
149@TYPE3+@ double% @ARG3+@ d
Keith Packard22671e22003-03-07 07:12:51 +0000150
151@PROTOTYPE++@
Akira TAGOHafe6e812022-12-13 16:05:41 +0900152@RET++@ FcBool
153@FUNC++@ FcPatternAddString
154@TYPE1++@ FcPattern * @ARG1++@ p
155@TYPE2++@ const char * @ARG2++@ object
156@TYPE3++@ const FcChar8 * @ARG3++@ s
Keith Packard22671e22003-03-07 07:12:51 +0000157
158@PROTOTYPE+++@
Akira TAGOHafe6e812022-12-13 16:05:41 +0900159@RET+++@ FcBool
160@FUNC+++@ FcPatternAddMatrix
161@TYPE1+++@ FcPattern * @ARG1+++@ p
162@TYPE2+++@ const char * @ARG2+++@ object
163@TYPE3+++@ const FcMatrix * @ARG3+++@ m
Keith Packard22671e22003-03-07 07:12:51 +0000164
165@PROTOTYPE++++@
Akira TAGOHafe6e812022-12-13 16:05:41 +0900166@RET++++@ FcBool
167@FUNC++++@ FcPatternAddCharSet
168@TYPE1++++@ FcPattern * @ARG1++++@ p
169@TYPE2++++@ const char * @ARG2++++@ object
170@TYPE3++++@ const FcCharSet * @ARG3++++@ c
Keith Packard22671e22003-03-07 07:12:51 +0000171
172@PROTOTYPE+++++@
Akira TAGOHafe6e812022-12-13 16:05:41 +0900173@RET+++++@ FcBool
174@FUNC+++++@ FcPatternAddBool
175@TYPE1+++++@ FcPattern * @ARG1+++++@ p
176@TYPE2+++++@ const char * @ARG2+++++@ object
177@TYPE3+++++@ FcBool% @ARG3+++++@ b
Keith Packarda1906782007-11-03 22:23:28 -0700178
179@PROTOTYPE++++++@
Akira TAGOHafe6e812022-12-13 16:05:41 +0900180@RET++++++@ FcBool
181@FUNC++++++@ FcPatternAddFTFace
182@TYPE1++++++@ FcPattern * @ARG1++++++@ p
183@TYPE2++++++@ const char * @ARG2++++++@ object
184@TYPE3++++++@ const FT_Face @ARG3++++++@ f
Keith Packarda1906782007-11-03 22:23:28 -0700185
186@PROTOTYPE+++++++@
Akira TAGOHafe6e812022-12-13 16:05:41 +0900187@RET+++++++@ FcBool
188@FUNC+++++++@ FcPatternAddLangSet
189@TYPE1+++++++@ FcPattern * @ARG1+++++++@ p
190@TYPE2+++++++@ const char * @ARG2+++++++@ object
191@TYPE3+++++++@ const FcLangSet * @ARG3+++++++@ l
Keith Packarda1906782007-11-03 22:23:28 -0700192
Akira TAGOHfcba9ef2014-03-26 16:01:49 +0900193@PROTOTYPE++++++++@
Akira TAGOHafe6e812022-12-13 16:05:41 +0900194@RET++++++++@ FcBool
195@FUNC++++++++@ FcPatternAddRange
196@TYPE1++++++++@ FcPattern * @ARG1++++++++@ p
197@TYPE2++++++++@ const char * @ARG2++++++++@ object
198@TYPE3++++++++@ const FcRange * @ARG3++++++++@ r
Akira TAGOHfcba9ef2014-03-26 16:01:49 +0900199
Akira TAGOHafe6e812022-12-13 16:05:41 +0900200@PURPOSE@ Add a typed value to a pattern
Keith Packard22671e22003-03-07 07:12:51 +0000201@DESC@
202These are all convenience functions that insert objects of the specified
203type into the pattern. Use these in preference to FcPatternAdd as they
204will provide compile-time typechecking. These all append values to
205any existing list of values.
Akira TAGOHfcba9ef2014-03-26 16:01:49 +0900206
207<function>FcPatternAddRange</function> are available since 2.11.91.
Keith Packard22671e22003-03-07 07:12:51 +0000208@@
209
Akira TAGOHafe6e812022-12-13 16:05:41 +0900210@RET@ FcResult
211@FUNC@ FcPatternGetWithBinding
212@TYPE1@ FcPattern * @ARG1@ p
213@TYPE2@ const char * @ARG2@ object
214@TYPE3@ int% @ARG3@ id
215@TYPE4@ FcValue * @ARG4@ v
216@TYPE5@ FcValueBinding * @ARG5@ b
217@PURPOSE@ Return a value with binding from a pattern
Akira TAGOHee200042015-07-28 12:48:40 +0900218@DESC@
219Returns in <parameter>v</parameter> the <parameter>id</parameter>'th value
220and <parameter>b</parameter> binding for that associated with the property
221<parameter>object</parameter>.
222The Value returned is not a copy, but rather refers to the data stored
223within the pattern directly. Applications must not free this value.
Akira TAGOHafe6e812022-12-13 16:05:41 +0900224@SINCE@ 2.12.5
Akira TAGOHee200042015-07-28 12:48:40 +0900225@@
226
Akira TAGOHafe6e812022-12-13 16:05:41 +0900227@RET@ FcResult
228@FUNC@ FcPatternGet
229@TYPE1@ FcPattern * @ARG1@ p
230@TYPE2@ const char * @ARG2@ object
231@TYPE3@ int% @ARG3@ id
232@TYPE4@ FcValue * @ARG4@ v
233@PURPOSE@ Return a value from a pattern
Keith Packard22671e22003-03-07 07:12:51 +0000234@DESC@
Keith Packard0c009d22005-03-01 20:36:48 +0000235Returns in <parameter>v</parameter> the <parameter>id</parameter>'th value
236associated with the property <parameter>object</parameter>.
Keith Packard22671e22003-03-07 07:12:51 +0000237The value returned is not a copy, but rather refers to the data stored
238within the pattern directly. Applications must not free this value.
239@@
240
Akira TAGOHafe6e812022-12-13 16:05:41 +0900241@TITLE@ FcPatternGet-Type
Keith Packard22671e22003-03-07 07:12:51 +0000242@PROTOTYPE@
Akira TAGOHafe6e812022-12-13 16:05:41 +0900243@RET@ FcResult
244@FUNC@ FcPatternGetInteger
245@TYPE1@ FcPattern * @ARG1@ p
246@TYPE2@ const char * @ARG2@ object
247@TYPE3@ int% @ARG3@ n
248@TYPE4@ int * @ARG4@ i
Keith Packard22671e22003-03-07 07:12:51 +0000249
250@PROTOTYPE+@
Akira TAGOHafe6e812022-12-13 16:05:41 +0900251@RET+@ FcResult
252@FUNC+@ FcPatternGetDouble
253@TYPE1+@ FcPattern * @ARG1+@ p
254@TYPE2+@ const char * @ARG2+@ object
255@TYPE3+@ int% @ARG3+@ n
256@TYPE4+@ double * @ARG4+@ d
Keith Packard22671e22003-03-07 07:12:51 +0000257
258@PROTOTYPE++@
Akira TAGOHafe6e812022-12-13 16:05:41 +0900259@RET++@ FcResult
260@FUNC++@ FcPatternGetString
261@TYPE1++@ FcPattern * @ARG1++@ p
262@TYPE2++@ const char * @ARG2++@ object
263@TYPE3++@ int% @ARG3++@ n
264@TYPE4++@ FcChar8 ** @ARG4++@ s
Keith Packard22671e22003-03-07 07:12:51 +0000265
266@PROTOTYPE+++@
Akira TAGOHafe6e812022-12-13 16:05:41 +0900267@RET+++@ FcResult
268@FUNC+++@ FcPatternGetMatrix
269@TYPE1+++@ FcPattern * @ARG1+++@ p
270@TYPE2+++@ const char * @ARG2+++@ object
271@TYPE3+++@ int% @ARG3+++@ n
272@TYPE4+++@ FcMatrix ** @ARG4+++@ s
Keith Packard22671e22003-03-07 07:12:51 +0000273
274@PROTOTYPE++++@
Akira TAGOHafe6e812022-12-13 16:05:41 +0900275@RET++++@ FcResult
276@FUNC++++@ FcPatternGetCharSet
277@TYPE1++++@ FcPattern * @ARG1++++@ p
278@TYPE2++++@ const char * @ARG2++++@ object
279@TYPE3++++@ int% @ARG3++++@ n
280@TYPE4++++@ FcCharSet ** @ARG4++++@ c
Keith Packard22671e22003-03-07 07:12:51 +0000281
282@PROTOTYPE+++++@
Akira TAGOHafe6e812022-12-13 16:05:41 +0900283@RET+++++@ FcResult
284@FUNC+++++@ FcPatternGetBool
285@TYPE1+++++@ FcPattern * @ARG1+++++@ p
286@TYPE2+++++@ const char * @ARG2+++++@ object
287@TYPE3+++++@ int% @ARG3+++++@ n
288@TYPE4+++++@ FcBool * @ARG4+++++@ b
Keith Packarda1906782007-11-03 22:23:28 -0700289
290@PROTOTYPE++++++@
Akira TAGOHafe6e812022-12-13 16:05:41 +0900291@RET++++++@ FcResult
292@FUNC++++++@ FcPatternGetFTFace
293@TYPE1++++++@ FcPattern * @ARG1++++++@ p
294@TYPE2++++++@ const char * @ARG2++++++@ object
295@TYPE3++++++@ int% @ARG3++++++@ n
296@TYPE4++++++@ FT_Face * @ARG4++++++@ f
Keith Packarda1906782007-11-03 22:23:28 -0700297
298@PROTOTYPE+++++++@
Akira TAGOHafe6e812022-12-13 16:05:41 +0900299@RET+++++++@ FcResult
300@FUNC+++++++@ FcPatternGetLangSet
301@TYPE1+++++++@ FcPattern * @ARG1+++++++@ p
302@TYPE2+++++++@ const char * @ARG2+++++++@ object
303@TYPE3+++++++@ int% @ARG3+++++++@ n
304@TYPE4+++++++@ FcLangSet ** @ARG4+++++++@ l
Akira TAGOHfcba9ef2014-03-26 16:01:49 +0900305
306@PROTOTYPE++++++++@
Akira TAGOHafe6e812022-12-13 16:05:41 +0900307@RET++++++++@ FcResult
308@FUNC++++++++@ FcPatternGetRange
309@TYPE1++++++++@ FcPattern * @ARG1++++++++@ p
310@TYPE2++++++++@ const char * @ARG2++++++++@ object
311@TYPE3++++++++@ int% @ARG3++++++++@ n
312@TYPE4++++++++@ FcRange ** @ARG4++++++++@ r
Keith Packarda1906782007-11-03 22:23:28 -0700313
Akira TAGOHafe6e812022-12-13 16:05:41 +0900314@PURPOSE@ Return a typed value from a pattern
Keith Packard22671e22003-03-07 07:12:51 +0000315@DESC@
316These are convenience functions that call FcPatternGet and verify that the
317returned data is of the expected type. They return FcResultTypeMismatch if
318this is not the case. Note that these (like FcPatternGet) do not make a
319copy of any data structure referenced by the return value. Use these
320in preference to FcPatternGet to provide compile-time typechecking.
Akira TAGOHfcba9ef2014-03-26 16:01:49 +0900321
322<function>FcPatternGetRange</function> are available since 2.11.91.
Keith Packard22671e22003-03-07 07:12:51 +0000323@@
324
Akira TAGOHafe6e812022-12-13 16:05:41 +0900325@RET@ FcPattern *
326@FUNC@ FcPatternBuild
327@TYPE1@ FcPattern * @ARG1@ pattern
328@TYPE2@ ...
Keith Packard22671e22003-03-07 07:12:51 +0000329
330@PROTOTYPE+@
Akira TAGOHafe6e812022-12-13 16:05:41 +0900331@RET+@ FcPattern *
332@FUNC+@ FcPatternVaBuild
333@TYPE1+@ FcPattern * @ARG1+@ pattern
334@TYPE2+@ va_list% @ARG2+@ va
Keith Packard1315db02007-11-13 15:48:30 -0800335
336@PROTOTYPE++@
Akira TAGOHafe6e812022-12-13 16:05:41 +0900337@RET++@ void
338@FUNC++@ FcPatternVapBuild
339@TYPE1++@ FcPattern * @ARG1++@ result
340@TYPE2++@ FcPattern * @ARG2++@ pattern
341@TYPE3++@ va_list% @ARG3++@ va
Keith Packard1315db02007-11-13 15:48:30 -0800342
Akira TAGOHafe6e812022-12-13 16:05:41 +0900343@PURPOSE@ Create patterns from arguments
Keith Packard22671e22003-03-07 07:12:51 +0000344@DESC@
345Builds a pattern using a list of objects, types and values. Each
346value to be entered in the pattern is specified with three arguments:
Keith Packard8c87b422003-04-23 04:09:28 +0000347</para>
Keith Packard22671e22003-03-07 07:12:51 +0000348<orderedlist>
349<listitem><para>
350Object name, a string describing the property to be added.
351</para></listitem><listitem><para>
352Object type, one of the FcType enumerated values
353</para></listitem><listitem><para>
354Value, not an FcValue, but the raw type as passed to any of the
355FcPatternAdd&lt;type&gt; functions. Must match the type of the second
356argument.
357</para></listitem>
358</orderedlist>
359<para>
360The argument list is terminated by a null object name, no object type nor
361value need be passed for this. The values are added to `pattern', if
362`pattern' is null, a new pattern is created. In either case, the pattern is
363returned. Example
364</para>
365<programlisting>
Patrick Lamaf7a9652006-01-30 04:51:22 +0000366pattern = FcPatternBuild (0, FC_FAMILY, FcTypeString, "Times", (char *) 0);
Keith Packard22671e22003-03-07 07:12:51 +0000367</programlisting>
368<para>
369FcPatternVaBuild is used when the arguments are already in the form of a
Keith Packard1315db02007-11-13 15:48:30 -0800370varargs value. FcPatternVapBuild is a macro version of FcPatternVaBuild
371which returns its result directly in the <parameter>result</parameter>
372variable.
Keith Packard22671e22003-03-07 07:12:51 +0000373@@
374
Akira TAGOHafe6e812022-12-13 16:05:41 +0900375@RET@ FcBool
376@FUNC@ FcPatternDel
377@TYPE1@ FcPattern * @ARG1@ p
378@TYPE2@ const char * @ARG2@ object
379@PURPOSE@ Delete a property from a pattern
Keith Packard22671e22003-03-07 07:12:51 +0000380@DESC@
Akira TAGOHafe6e812022-12-13 16:05:41 +0900381Deletes all values associated with the property `object', returning
Keith Packard22671e22003-03-07 07:12:51 +0000382whether the property existed or not.
383@@
384
Akira TAGOHafe6e812022-12-13 16:05:41 +0900385@RET@ FcBool
386@FUNC@ FcPatternRemove
387@TYPE1@ FcPattern * @ARG1@ p
388@TYPE2@ const char * @ARG2@ object
389@TYPE3@ int% @ARG3@ id
390@PURPOSE@ Remove one object of the specified type from the pattern
Keith Packard4f27c1c2004-12-04 19:41:10 +0000391@DESC@
Akira TAGOHafe6e812022-12-13 16:05:41 +0900392Removes the value associated with the property `object' at position `id', returning
Keith Packard4f27c1c2004-12-04 19:41:10 +0000393whether the property existed and had a value at that position or not.
394@@
Akira TAGOH307639c2018-05-11 20:48:30 +0900395
Akira TAGOHafe6e812022-12-13 16:05:41 +0900396@RET@ void
397@FUNC@ FcPatternIterStart
398@TYPE1@ const FcPattern * @ARG1@ p
399@TYPE2@ FcPatternIter * @ARG2@ iter
400@PURPOSE@ Initialize the iterator with the first iterator in the pattern
Akira TAGOH307639c2018-05-11 20:48:30 +0900401@DESC@
402Initialize <parameter>iter</parameter> with the first iterator in <parameter>p</parameter>.
403If there are no objects in <parameter>p</parameter>, <parameter>iter</parameter>
404will not have any valid data.
Akira TAGOHafe6e812022-12-13 16:05:41 +0900405@SINCE@ 2.13.1
Akira TAGOH307639c2018-05-11 20:48:30 +0900406@@
407
Akira TAGOHafe6e812022-12-13 16:05:41 +0900408@RET@ FcBool
409@FUNC@ FcPatternIterNext
410@TYPE1@ const FcPattern * @ARG1@ p
411@TYPE2@ FcPatternIter * @ARG2@ iter
412@PURPUSE@ Set the iterator to point to the next object in the pattern
Akira TAGOH307639c2018-05-11 20:48:30 +0900413@DESC@
414Set <parameter>iter</parameter> to point to the next object in <parameter>p</parameter>
415and returns FcTrue if <parameter>iter</parameter> has been changed to the next object.
416returns FcFalse otherwise.
Akira TAGOHafe6e812022-12-13 16:05:41 +0900417@SINCE@ 2.13.1
Akira TAGOH307639c2018-05-11 20:48:30 +0900418@@
419
Akira TAGOHafe6e812022-12-13 16:05:41 +0900420@RET@ FcBool
421@FUNC@ FcPatternIterEqual
422@TYPE1@ const FcPattern * @ARG1@ p1
423@TYPE2@ FcPatternIter * @ARG2@ i1
424@TYPE3@ const FcPattern * @ARG3@ p2
425@TYPE4@ FcPatternIter * @ARG4@ i2
426@PURPOSE@ Compare iterators
Akira TAGOH307639c2018-05-11 20:48:30 +0900427@DESC@
428Return FcTrue if both <parameter>i1</parameter> and <parameter>i2</parameter>
429point to same object and contains same values. return FcFalse otherwise.
Akira TAGOHafe6e812022-12-13 16:05:41 +0900430@SINCE@ 2.13.1
Akira TAGOH307639c2018-05-11 20:48:30 +0900431@@
432
Akira TAGOHafe6e812022-12-13 16:05:41 +0900433@RET@ FcBool
434@FUNC@ FcPatternFindIter
435@TYPE1@ const FcPattern * @ARG1@ p
436@TYPE2@ FcPatternIter * @ARG2@ iter
437@TYPE3@ const char * @ARG3@ object
438@PURPOSE@ Set the iterator to point to the object in the pattern
Akira TAGOH307639c2018-05-11 20:48:30 +0900439@DESC@
440Set <parameter>iter</parameter> to point to <parameter>object</parameter> in
441<parameter>p</parameter> if any and returns FcTrue. returns FcFalse otherwise.
Akira TAGOHafe6e812022-12-13 16:05:41 +0900442@SINCE@ 2.13.1
Akira TAGOH307639c2018-05-11 20:48:30 +0900443@@
444
Akira TAGOHafe6e812022-12-13 16:05:41 +0900445@RET@ FcBool
446@FUNC@ FcPatternIterIsValid
447@TYPE1@ const FcPattern * @ARG1@ p
448@TYPE2@ FcPatternIter : @ARG2@ iter
449@PURPOSE@ Check whether the iterator is valid or not
Akira TAGOH307639c2018-05-11 20:48:30 +0900450@DESC@
451Returns FcTrue if <parameter>iter</parameter> point to the valid entry
452in <parameter>p</parameter>. returns FcFalse otherwise.
Akira TAGOHafe6e812022-12-13 16:05:41 +0900453@SINCE@ 2.13.1
Akira TAGOH307639c2018-05-11 20:48:30 +0900454@@
455
Akira TAGOHafe6e812022-12-13 16:05:41 +0900456@RET@ const char *
457@FUNC@ FcPatternIterGetObject
458@TYPE1@ const FcPattern * @ARG1@ p
459@TYPE2@ FcPatternIter * @ARG2@ iter
460@PURPOSE@ Returns an object name which the iterator point to
Akira TAGOH307639c2018-05-11 20:48:30 +0900461@DESC@
462Returns an object name in <parameter>p</parameter> which
463<parameter>iter</parameter> point to. returns NULL if
464<parameter>iter</parameter> isn't valid.
Akira TAGOHafe6e812022-12-13 16:05:41 +0900465@SINCE@ 2.13.1
Akira TAGOH307639c2018-05-11 20:48:30 +0900466@@
467
Akira TAGOHafe6e812022-12-13 16:05:41 +0900468@RET@ int
469@FUNC@ FcPatternIterValueCount
470@TYPE1@ const FcPattern * @ARG1@ p
471@TYPE2@ FcPatternIter * @ARG2@ iter
472@PURPOSE@ Returns the number of the values which the iterator point to
Akira TAGOH307639c2018-05-11 20:48:30 +0900473@DESC@
474Returns the number of the values in the object which <parameter>iter</parameter>
475point to. if <parameter>iter</parameter> isn't valid, returns 0.
Akira TAGOHafe6e812022-12-13 16:05:41 +0900476@SINCE@ 2.13.1
Akira TAGOH307639c2018-05-11 20:48:30 +0900477@@
478
Akira TAGOHafe6e812022-12-13 16:05:41 +0900479@RET@ FcResult
480@FUNC@ FcPatternIterGetValue
481@TYPE1@ const FcPattern * @ARG1@ p
482@TYPE2@ FcPatternIter * @ARG2@ iter
483@TYPE3@ int @ARG3@ id
484@TYPE4@ FcValue * @ARG4@ v
485@TYPE5@ FcValueBinding * @ARG5@ b
486@PURPOSE@ Returns a value which the iterator point to
Akira TAGOH307639c2018-05-11 20:48:30 +0900487@DESC@
488Returns in <parameter>v</parameter> the <parameter>id</parameter>'th value
489which <parameter>iter</parameter> point to. also binding to <parameter>b</parameter>
490if given.
491The value returned is not a copy, but rather refers to the data stored
492within the pattern directly. Applications must not free this value.
Akira TAGOHafe6e812022-12-13 16:05:41 +0900493@SINCE@ 2.13.1
Akira TAGOH307639c2018-05-11 20:48:30 +0900494@@
495
Akira TAGOHafe6e812022-12-13 16:05:41 +0900496@RET@ void
497@FUNC@ FcPatternPrint
498@TYPE1@ const FcPattern * @ARG1@ p
499@PURPOSE@ Print a pattern for debugging
Keith Packard22671e22003-03-07 07:12:51 +0000500@DESC@
501Prints an easily readable version of the pattern to stdout. There is
502no provision for reparsing data in this format, it's just for diagnostics
503and debugging.
504@@
505
Akira TAGOHafe6e812022-12-13 16:05:41 +0900506@RET@ void
507@FUNC@ FcDefaultSubstitute
508@TYPE1@ FcPattern * @ARG1@ pattern
509@PURPOSE@ Perform default substitutions in a pattern
Keith Packard22671e22003-03-07 07:12:51 +0000510@DESC@
511Supplies default values for underspecified font patterns:
512<itemizedlist>
513<listitem><para>
514Patterns without a specified style or weight are set to Medium
515</para></listitem>
516<listitem><para>
517Patterns without a specified style or slant are set to Roman
518</para></listitem>
519<listitem><para>
520Patterns without a specified pixel size are given one computed from any
521specified point size (default 12), dpi (default 75) and scale (default 1).
522</para></listitem>
523</itemizedlist>
524@@
525
Akira TAGOHafe6e812022-12-13 16:05:41 +0900526@RET@ FcPattern *
527@FUNC@ FcNameParse
528@TYPE1@ const FcChar8 * @ARG1@ name
529@PURPOSE@ Parse a pattern string
Keith Packard22671e22003-03-07 07:12:51 +0000530@DESC@
Keith Packard2df0c662003-03-07 08:51:14 +0000531Converts <parameter>name</parameter> from the standard text format described above into a pattern.
Keith Packard22671e22003-03-07 07:12:51 +0000532@@
533
Akira TAGOHafe6e812022-12-13 16:05:41 +0900534@RET@ FcChar8 *
535@FUNC@ FcNameUnparse
536@TYPE1@ FcPattern * @ARG1@ pat
537@PURPOSE@ Convert a pattern back into a string that can be parsed
Keith Packard22671e22003-03-07 07:12:51 +0000538@DESC@
539Converts the given pattern into the standard text format described above.
540The return value is not static, but instead refers to newly allocated memory
Behdad Esfahbod8072f4b2008-08-22 18:25:22 -0400541which should be freed by the caller using free().
Keith Packard22671e22003-03-07 07:12:51 +0000542@@