]> git.wh0rd.org - fontconfig.git/blob - doc/fcpattern.fncs
Rework documentation to build man pages for each function
[fontconfig.git] / doc / fcpattern.fncs
1 @RET@ FcPattern *
2 @FUNC@ FcPatternCreate
3 @TYPE1@ void
4 @PURPOSE@ Create a pattern
5 @DESC@
6 Creates a pattern with no properties; used to build patterns from scratch.
7 @@
8
9 @RET@ void
10 @FUNC@ FcPatternDestroy
11 @TYPE1@ FcPattern * @ARG1@ p
12 @PURPOSE@ Destroy a pattern
13 @DESC@
14 Destroys a pattern, in the process destroying all related values.
15 @@
16
17 @RET@ FcBool
18 @FUNC@ FcPatternEqual
19 @TYPE1@ const FcPattern * @ARG1@ pa
20 @TYPE2@ const FcPattern * @ARG2@ pb
21 @PURPOSE@ Compare patterns
22 @DESC@
23 Returns whether 'pa' and 'pb' are exactly alike.
24 @@
25
26 @RET@ FcBool
27 @FUNC@ FcPatternEqualSubset
28 @TYPE1@ const FcPattern * @ARG1@ pa
29 @TYPE2@ const FcPattern * @ARG2@ pb
30 @TYPE3@ const FcObjectSet * @ARG3@ os
31 @PURPOSE@ Compare portions of patterns
32 @DESC@
33 Returns whether 'pa' and 'pb' have exactly the same values for all of the
34 objects in 'os'.
35 @@
36
37 @RET@ FcChar32
38 @FUNC@ FcPatternHash
39 @TYPE1@ const FcPattern * @ARG1@ p
40 @PURPOSE@ Compute a pattern hash value
41 @DESC@
42 Returns a 32-bit number which is the same for any two patterns which are
43 equal.
44 @@
45
46 @RET@ FcBool
47 @FUNC@ FcPatternAdd
48 @TYPE1@ FcPattern * @ARG1@ p
49 @TYPE2@ const char * @ARG2@ object
50 @TYPE3@ FcValue @ARG3@ value
51 @TYPE4@ FcBool @ARG4@ append
52 @PURPOSE@ Add a value to a pattern
53 @DESC@
54 Adds a single value to the list of values associated with the property named
55 `object'. If `append' is FcTrue, the value is added at the end of any
56 existing list, otherwise it is inserted at the begining. `value' is saved
57 (with FcValueSave) when inserted into the pattern so that the library
58 retains no reference to any application-supplied data structure.
59 @@
60
61 @RET@ FcBool
62 @FUNC@ FcPatternAddWeak
63 @TYPE1@ FcPattern * @ARG1@ p
64 @TYPE2@ const char * @ARG2@ object
65 @TYPE3@ FcValue @ARG3@ value
66 @TYPE4@ FcBool @ARG4@ append
67 @PURPOSE@ Add a value to a pattern with weak binding
68 @DESC@
69 FcPatternAddWeak is essentially the same as FcPatternAdd except that any
70 values added to the list have binding 'weak' instead of 'strong'.
71 @@
72
73 @TITLE@ FcPatternAdd-Type
74 @RET@ FcBool
75 @FUNC@ FcPatternAddInteger
76 @TYPE1@ FcPattern * @ARG1@ p
77 @TYPE2@ const char * @ARG2@ object
78 @TYPE3@ int @ARG3@ i
79
80 @PROTOTYPE+@
81 @RET+@ FcBool
82 @FUNC+@ FcPatternAddDouble
83 @TYPE1+@ FcPattern * @ARG1+@ p
84 @TYPE2+@ const char * @ARG2+@ object
85 @TYPE3+@ double @ARG3+@ d
86
87 @PROTOTYPE++@
88 @RET++@ FcBool
89 @FUNC++@ FcPatternAddString
90 @TYPE1++@ FcPattern * @ARG1++@ p
91 @TYPE2++@ const char * @ARG2++@ object
92 @TYPE3++@ const char * @ARG3++@ s
93
94 @PROTOTYPE+++@
95 @RET+++@ FcBool
96 @FUNC+++@ FcPatternAddMatrix
97 @TYPE1+++@ FcPattern * @ARG1+++@ p
98 @TYPE2+++@ const char * @ARG2+++@ object
99 @TYPE3+++@ const FcMatrix * @ARG3+++@ m
100
101 @PROTOTYPE++++@
102 @RET++++@ FcBool
103 @FUNC++++@ FcPatternAddCharSet
104 @TYPE1++++@ FcPattern * @ARG1++++@ p
105 @TYPE2++++@ const char * @ARG2++++@ object
106 @TYPE3++++@ const FcCharSet * @ARG3++++@ c
107
108 @PROTOTYPE+++++@
109 @RET+++++@ FcBool
110 @FUNC+++++@ FcPatternAddBool
111 @TYPE1+++++@ FcPattern * @ARG1+++++@ p
112 @TYPE2+++++@ const char * @ARG2+++++@ object
113 @TYPE3+++++@ FcBool @ARG3+++++@ b
114 @PURPOSE@ Add a typed value to a pattern
115 @DESC@
116 These are all convenience functions that insert objects of the specified
117 type into the pattern. Use these in preference to FcPatternAdd as they
118 will provide compile-time typechecking. These all append values to
119 any existing list of values.
120 @@
121
122 @RET@ FcResult
123 @FUNC@ FcPatternGet
124 @TYPE1@ FcPattern * @ARG1@ p
125 @TYPE2@ const char * @ARG2@ object
126 @TYPE3@ int @ARG3@ id
127 @TYPE4@ FcValue * @ARG4@ v
128 @PURPOSE@ Return a value from a pattern
129 @DESC@
130 Returns in `v' the `id'th value associated with the property `object'.
131 The value returned is not a copy, but rather refers to the data stored
132 within the pattern directly. Applications must not free this value.
133 @@
134
135 @TITLE@ FcPatternGet-Type
136 @PROTOTYPE@
137 @RET@ FcResult
138 @FUNC@ FcPatternGetInteger
139 @TYPE1@ FcPattern * @ARG1@ p
140 @TYPE2@ const char * @ARG2@ object
141 @TYPE3@ int @ARG3@ n
142 @TYPE4@ int * @ARG4@ i
143
144 @PROTOTYPE+@
145 @RET+@ FcResult
146 @FUNC+@ FcPatternGetDouble
147 @TYPE1+@ FcPattern * @ARG1+@ p
148 @TYPE2+@ const char * @ARG2+@ object
149 @TYPE3+@ int @ARG3+@ n
150 @TYPE4+@ double * @ARG4+@ d
151
152 @PROTOTYPE++@
153 @RET++@ FcResult
154 @FUNC++@ FcPatternGetString
155 @TYPE1++@ FcPattern * @ARG1++@ p
156 @TYPE2++@ const char * @ARG2++@ object
157 @TYPE3++@ int @ARG3++@ n
158 @TYPE4++@ char **const @ARG4++@ s
159
160 @PROTOTYPE+++@
161 @RET+++@ FcResult
162 @FUNC+++@ FcPatternGetMatrix
163 @TYPE1+++@ FcPattern * @ARG1+++@ p
164 @TYPE2+++@ const char * @ARG2+++@ object
165 @TYPE3+++@ int @ARG3+++@ n
166 @TYPE4+++@ FcMatrix ** @ARG4+++@ s
167
168 @PROTOTYPE++++@
169 @RET++++@ FcResult
170 @FUNC++++@ FcPatternGetCharSet
171 @TYPE1++++@ FcPattern * @ARG1++++@ p
172 @TYPE2++++@ const char * @ARG2++++@ object
173 @TYPE3++++@ int @ARG3++++@ n
174 @TYPE4++++@ FcCharSet ** @ARG4++++@ c
175
176 @PROTOTYPE+++++@
177 @RET+++++@ FcResult
178 @FUNC+++++@ FcPatternGetBool
179 @TYPE1+++++@ FcPattern * @ARG1+++++@ p
180 @TYPE2+++++@ const char * @ARG2+++++@ object
181 @TYPE3+++++@ int @ARG3+++++@ n
182 @TYPE4+++++@ FcBool * @ARG4+++++@ b
183 @PURPOSE@ Return a typed value from a pattern
184 @DESC@
185 These are convenience functions that call FcPatternGet and verify that the
186 returned data is of the expected type. They return FcResultTypeMismatch if
187 this is not the case. Note that these (like FcPatternGet) do not make a
188 copy of any data structure referenced by the return value. Use these
189 in preference to FcPatternGet to provide compile-time typechecking.
190 @@
191
192 @RET@ FcPattern *
193 @FUNC@ FcPatternBuild
194 @TYPE1@ FcPattern * @ARG1@ orig
195 @TYPE2@ ...
196
197 @PROTOTYPE+@
198 @RET+@ FcPattern *
199 @FUNC+@ FcPatternVaBuild
200 @TYPE1+@ FcPattern * @ARG1+@ orig
201 @TYPE2+@ va_list @ARG2+@ va
202 @PURPOSE@ Create patterns from arguments
203 @DESC@
204 Builds a pattern using a list of objects, types and values. Each
205 value to be entered in the pattern is specified with three arguments:
206 <orderedlist>
207 <listitem><para>
208 Object name, a string describing the property to be added.
209 </para></listitem><listitem><para>
210 Object type, one of the FcType enumerated values
211 </para></listitem><listitem><para>
212 Value, not an FcValue, but the raw type as passed to any of the
213 FcPatternAdd&lt;type&gt; functions. Must match the type of the second
214 argument.
215 </para></listitem>
216 </orderedlist>
217 <para>
218 The argument list is terminated by a null object name, no object type nor
219 value need be passed for this. The values are added to `pattern', if
220 `pattern' is null, a new pattern is created. In either case, the pattern is
221 returned. Example
222 </para>
223 <programlisting>
224 pattern = FcPatternBuild (0, FC_FAMILY, FtTypeString, "Times", (char *) 0);
225 </programlisting>
226 <para>
227 FcPatternVaBuild is used when the arguments are already in the form of a
228 varargs value.
229 @@
230
231 @RET@ FcBool
232 @FUNC@ FcPatternDel
233 @TYPE1@ FcPattern * @ARG1@ p
234 @TYPE2@ const char * @ARG2@ object
235 @PURPOSE@ Delete a property from a pattern
236 @DESC@
237 Deletes all values associated with the property `object', returning
238 whether the property existed or not.
239 @@
240
241 @RET@ void
242 @FUNC@ FcPatternPrint
243 @TYPE1@ const FcPattern * @ARG1@ p
244 @PURPOSE@ Print a pattern for debugging
245 @DESC@
246 Prints an easily readable version of the pattern to stdout. There is
247 no provision for reparsing data in this format, it's just for diagnostics
248 and debugging.
249 @@
250
251 @RET@ void
252 @FUNC@ FcDefaultSubstitute
253 @TYPE1@ FcPattern * @ARG1@ pattern
254 @PURPOSE@ Perform default substitutions in a pattern
255 @DESC@
256 Supplies default values for underspecified font patterns:
257 <itemizedlist>
258 <listitem><para>
259 Patterns without a specified style or weight are set to Medium
260 </para></listitem>
261 <listitem><para>
262 Patterns without a specified style or slant are set to Roman
263 </para></listitem>
264 <listitem><para>
265 Patterns without a specified pixel size are given one computed from any
266 specified point size (default 12), dpi (default 75) and scale (default 1).
267 </para></listitem>
268 </itemizedlist>
269 @@
270
271 @RET@ FcPattern *
272 @FUNC@ FcNameParse
273 @TYPE1@ const char * @ARG1@ name
274 @PURPOSE@ Parse a pattern string
275 @DESC@
276 Converts 'name' from the standard text format described above into a pattern.
277 @@
278
279 @RET@ FcChar8 *
280 @FUNC@ FcNameUnparse
281 @TYPE1@ FcPattern * @ARG1@ pat
282 @PURPOSE@ Convert a pattern back into a string that can be parsed
283 @DESC@
284 Converts the given pattern into the standard text format described above.
285 The return value is not static, but instead refers to newly allocated memory
286 which should be freed by the caller.
287 @@