]>
Commit | Line | Data |
---|---|---|
24330d27 | 1 | /* |
4c2967f6 | 2 | * $RCSId: xc/lib/fontconfig/fontconfig/fontconfig.h,v 1.30 2002/09/26 00:17:27 keithp Exp $ |
24330d27 | 3 | * |
46b51147 | 4 | * Copyright © 2001 Keith Packard |
24330d27 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 | */ | |
24 | ||
25 | #ifndef _FONTCONFIG_H_ | |
26 | #define _FONTCONFIG_H_ | |
27 | ||
28 | #include <stdarg.h> | |
29 | ||
30 | typedef unsigned char FcChar8; | |
31 | typedef unsigned short FcChar16; | |
32 | typedef unsigned int FcChar32; | |
33 | typedef int FcBool; | |
34 | ||
35 | /* | |
ff3f1f98 KP |
36 | * Current Fontconfig version number. This same number |
37 | * must appear in the fontconfig configure.in file. Yes, | |
38 | * it'a a pain to synchronize version numbers like this. | |
24330d27 | 39 | */ |
20fa60c9 | 40 | |
ff3f1f98 | 41 | #define FC_MAJOR 2 |
781f1048 | 42 | #define FC_MINOR 2 |
308dc9c3 | 43 | #define FC_REVISION 97 |
24330d27 KP |
44 | |
45 | #define FC_VERSION ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION)) | |
46 | ||
f21f40f3 KP |
47 | /* |
48 | * Current font cache file format version | |
49 | * This is appended to the cache files so that multiple | |
50 | * versions of the library will peacefully coexist | |
51 | * | |
52 | * Change this value whenever the disk format for the cache file | |
53 | * changes in any non-compatible way. Try to avoid such changes as | |
54 | * it means multiple copies of the font information. | |
55 | */ | |
56 | ||
57 | #define FC_CACHE_VERSION "1" | |
58 | ||
24330d27 KP |
59 | #define FcTrue 1 |
60 | #define FcFalse 0 | |
61 | ||
62 | #define FC_FAMILY "family" /* String */ | |
63 | #define FC_STYLE "style" /* String */ | |
64 | #define FC_SLANT "slant" /* Int */ | |
65 | #define FC_WEIGHT "weight" /* Int */ | |
66 | #define FC_SIZE "size" /* Double */ | |
2a41214a | 67 | #define FC_ASPECT "aspect" /* Double */ |
24330d27 KP |
68 | #define FC_PIXEL_SIZE "pixelsize" /* Double */ |
69 | #define FC_SPACING "spacing" /* Int */ | |
70 | #define FC_FOUNDRY "foundry" /* String */ | |
71 | #define FC_ANTIALIAS "antialias" /* Bool (depends) */ | |
72 | #define FC_HINTING "hinting" /* Bool (true) */ | |
f077d662 | 73 | #define FC_HINT_STYLE "hintstyle" /* Int */ |
24330d27 KP |
74 | #define FC_VERTICAL_LAYOUT "verticallayout" /* Bool (false) */ |
75 | #define FC_AUTOHINT "autohint" /* Bool (false) */ | |
76 | #define FC_GLOBAL_ADVANCE "globaladvance" /* Bool (true) */ | |
81fa16c3 | 77 | #define FC_WIDTH "width" /* Int */ |
24330d27 KP |
78 | #define FC_FILE "file" /* String */ |
79 | #define FC_INDEX "index" /* Int */ | |
be094850 | 80 | #define FC_FT_FACE "ftface" /* FT_Face */ |
24330d27 KP |
81 | #define FC_RASTERIZER "rasterizer" /* String */ |
82 | #define FC_OUTLINE "outline" /* Bool */ | |
83 | #define FC_SCALABLE "scalable" /* Bool */ | |
84 | #define FC_SCALE "scale" /* double */ | |
85 | #define FC_DPI "dpi" /* double */ | |
86 | #define FC_RGBA "rgba" /* Int */ | |
87 | #define FC_MINSPACE "minspace" /* Bool use minimum line spacing */ | |
88 | #define FC_SOURCE "source" /* String (X11, freetype) */ | |
89 | #define FC_CHARSET "charset" /* CharSet */ | |
a342e87d KP |
90 | #define FC_LANG "lang" /* String RFC 3066 langs */ |
91 | #define FC_FONTVERSION "fontversion" /* Int from 'head' table */ | |
4f27c1c0 KP |
92 | #define FC_FULLNAME "fullname" /* String */ |
93 | #define FC_FAMILYLANG "familylang" /* String RFC 3066 langs */ | |
94 | #define FC_STYLELANG "stylelang" /* String RFC 3066 langs */ | |
95 | #define FC_FULLNAMELANG "fullnamelang" /* String RFC 3066 langs */ | |
dbf68dd5 | 96 | #define FC_CAPABILITY "capability" /* String */ |
537e3d23 | 97 | #define FC_FONTFORMAT "fontformat" /* String */ |
24330d27 | 98 | |
f21f40f3 KP |
99 | #define FC_DIR_CACHE_FILE "fonts.cache-"FC_CACHE_VERSION |
100 | #define FC_USER_CACHE_FILE ".fonts.cache-"FC_CACHE_VERSION | |
24330d27 KP |
101 | |
102 | /* Adjust outline rasterizer */ | |
103 | #define FC_CHAR_WIDTH "charwidth" /* Int */ | |
104 | #define FC_CHAR_HEIGHT "charheight"/* Int */ | |
105 | #define FC_MATRIX "matrix" /* FcMatrix */ | |
106 | ||
81fa16c3 KP |
107 | #define FC_WEIGHT_THIN 0 |
108 | #define FC_WEIGHT_EXTRALIGHT 40 | |
109 | #define FC_WEIGHT_ULTRALIGHT FC_WEIGHT_EXTRALIGHT | |
110 | #define FC_WEIGHT_LIGHT 50 | |
ad293de0 | 111 | #define FC_WEIGHT_BOOK 75 |
81fa16c3 KP |
112 | #define FC_WEIGHT_REGULAR 80 |
113 | #define FC_WEIGHT_NORMAL FC_WEIGHT_REGULAR | |
114 | #define FC_WEIGHT_MEDIUM 100 | |
115 | #define FC_WEIGHT_DEMIBOLD 180 | |
116 | #define FC_WEIGHT_SEMIBOLD FC_WEIGHT_DEMIBOLD | |
117 | #define FC_WEIGHT_BOLD 200 | |
118 | #define FC_WEIGHT_EXTRABOLD 205 | |
3f7653c2 | 119 | #define FC_WEIGHT_ULTRABOLD FC_WEIGHT_EXTRABOLD |
81fa16c3 | 120 | #define FC_WEIGHT_BLACK 210 |
3f7653c2 | 121 | #define FC_WEIGHT_HEAVY FC_WEIGHT_BLACK |
81fa16c3 KP |
122 | |
123 | #define FC_SLANT_ROMAN 0 | |
124 | #define FC_SLANT_ITALIC 100 | |
125 | #define FC_SLANT_OBLIQUE 110 | |
126 | ||
127 | #define FC_WIDTH_ULTRACONDENSED 50 | |
128 | #define FC_WIDTH_EXTRACONDENSED 63 | |
129 | #define FC_WIDTH_CONDENSED 75 | |
130 | #define FC_WIDTH_SEMICONDENSED 87 | |
131 | #define FC_WIDTH_NORMAL 100 | |
132 | #define FC_WIDTH_SEMIEXPANDED 113 | |
133 | #define FC_WIDTH_EXPANDED 125 | |
134 | #define FC_WIDTH_EXTRAEXPANDED 150 | |
135 | #define FC_WIDTH_ULTRAEXPANDED 200 | |
136 | ||
137 | #define FC_PROPORTIONAL 0 | |
a05d257f | 138 | #define FC_DUAL 90 |
81fa16c3 KP |
139 | #define FC_MONO 100 |
140 | #define FC_CHARCELL 110 | |
24330d27 KP |
141 | |
142 | /* sub-pixel order */ | |
1852d490 | 143 | #define FC_RGBA_UNKNOWN 0 |
24330d27 KP |
144 | #define FC_RGBA_RGB 1 |
145 | #define FC_RGBA_BGR 2 | |
146 | #define FC_RGBA_VRGB 3 | |
147 | #define FC_RGBA_VBGR 4 | |
1852d490 | 148 | #define FC_RGBA_NONE 5 |
24330d27 | 149 | |
f077d662 OT |
150 | /* hinting style */ |
151 | #define FC_HINT_NONE 0 | |
152 | #define FC_HINT_SLIGHT 1 | |
153 | #define FC_HINT_MEDIUM 2 | |
154 | #define FC_HINT_FULL 3 | |
155 | ||
24330d27 KP |
156 | typedef enum _FcType { |
157 | FcTypeVoid, | |
158 | FcTypeInteger, | |
159 | FcTypeDouble, | |
160 | FcTypeString, | |
161 | FcTypeBool, | |
162 | FcTypeMatrix, | |
be094850 | 163 | FcTypeCharSet, |
d8d73958 KP |
164 | FcTypeFTFace, |
165 | FcTypeLangSet | |
24330d27 KP |
166 | } FcType; |
167 | ||
168 | typedef struct _FcMatrix { | |
169 | double xx, xy, yx, yy; | |
170 | } FcMatrix; | |
171 | ||
172 | #define FcMatrixInit(m) ((m)->xx = (m)->yy = 1, \ | |
173 | (m)->xy = (m)->yx = 0) | |
174 | ||
175 | /* | |
176 | * A data structure to represent the available glyphs in a font. | |
177 | * This is represented as a sparse boolean btree. | |
178 | */ | |
179 | ||
180 | typedef struct _FcCharSet FcCharSet; | |
181 | ||
182 | typedef struct _FcObjectType { | |
183 | const char *object; | |
184 | FcType type; | |
185 | } FcObjectType; | |
186 | ||
187 | typedef struct _FcConstant { | |
ccb3e93b | 188 | const FcChar8 *name; |
24330d27 KP |
189 | const char *object; |
190 | int value; | |
191 | } FcConstant; | |
192 | ||
193 | typedef enum _FcResult { | |
ec0c740e | 194 | FcResultMatch, FcResultNoMatch, FcResultTypeMismatch, FcResultNoId, |
3d1ea0e5 | 195 | FcResultOutOfMemory |
24330d27 KP |
196 | } FcResult; |
197 | ||
938bc633 KP |
198 | typedef struct _FcPattern FcPattern; |
199 | ||
d8d73958 KP |
200 | typedef struct _FcLangSet FcLangSet; |
201 | ||
24330d27 KP |
202 | typedef struct _FcValue { |
203 | FcType type; | |
204 | union { | |
205 | const FcChar8 *s; | |
206 | int i; | |
207 | FcBool b; | |
208 | double d; | |
209 | const FcMatrix *m; | |
210 | const FcCharSet *c; | |
be094850 | 211 | void *f; |
938bc633 | 212 | const FcPattern *p; |
d8d73958 | 213 | const FcLangSet *l; |
24330d27 KP |
214 | } u; |
215 | } FcValue; | |
216 | ||
24330d27 KP |
217 | typedef struct _FcFontSet { |
218 | int nfont; | |
219 | int sfont; | |
220 | FcPattern **fonts; | |
221 | } FcFontSet; | |
222 | ||
223 | typedef struct _FcObjectSet { | |
224 | int nobject; | |
225 | int sobject; | |
226 | const char **objects; | |
227 | } FcObjectSet; | |
228 | ||
229 | typedef enum _FcMatchKind { | |
938bc633 | 230 | FcMatchPattern, FcMatchFont |
24330d27 KP |
231 | } FcMatchKind; |
232 | ||
d8d73958 KP |
233 | typedef enum _FcLangResult { |
234 | FcLangEqual, FcLangDifferentCountry, FcLangDifferentLang | |
235 | } FcLangResult; | |
236 | ||
24330d27 KP |
237 | typedef enum _FcSetName { |
238 | FcSetSystem = 0, | |
239 | FcSetApplication = 1 | |
240 | } FcSetName; | |
241 | ||
134f6011 KP |
242 | typedef struct _FcAtomic FcAtomic; |
243 | ||
24330d27 KP |
244 | #if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */ |
245 | #define _FCFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */ | |
246 | #define _FCFUNCPROTOEND } | |
247 | #else | |
248 | #define _FCFUNCPROTOBEGIN | |
249 | #define _FCFUNCPROTOEND | |
250 | #endif | |
251 | ||
69937bd9 KP |
252 | typedef enum { FcEndianBig, FcEndianLittle } FcEndian; |
253 | ||
24330d27 KP |
254 | typedef struct _FcConfig FcConfig; |
255 | ||
327a7fd4 | 256 | typedef struct _FcGlobalCache FcFileCache; |
24330d27 KP |
257 | |
258 | typedef struct _FcBlanks FcBlanks; | |
259 | ||
179c3995 KP |
260 | typedef struct _FcStrList FcStrList; |
261 | ||
262 | typedef struct _FcStrSet FcStrSet; | |
263 | ||
24330d27 KP |
264 | _FCFUNCPROTOBEGIN |
265 | ||
c2e9d024 MALF |
266 | FcBool |
267 | FcDirCacheValid (const FcChar8 *cache_file); | |
268 | ||
24330d27 KP |
269 | /* fcblanks.c */ |
270 | FcBlanks * | |
271 | FcBlanksCreate (void); | |
272 | ||
273 | void | |
274 | FcBlanksDestroy (FcBlanks *b); | |
275 | ||
276 | FcBool | |
277 | FcBlanksAdd (FcBlanks *b, FcChar32 ucs4); | |
278 | ||
279 | FcBool | |
280 | FcBlanksIsMember (FcBlanks *b, FcChar32 ucs4); | |
281 | ||
282 | /* fccfg.c */ | |
ff3f1f98 KP |
283 | FcChar8 * |
284 | FcConfigHome (void); | |
285 | ||
286 | FcBool | |
287 | FcConfigEnableHome (FcBool enable); | |
288 | ||
ccb3e93b KP |
289 | FcChar8 * |
290 | FcConfigFilename (const FcChar8 *url); | |
24330d27 KP |
291 | |
292 | FcConfig * | |
293 | FcConfigCreate (void); | |
294 | ||
295 | void | |
296 | FcConfigDestroy (FcConfig *config); | |
297 | ||
298 | FcBool | |
299 | FcConfigSetCurrent (FcConfig *config); | |
300 | ||
301 | FcConfig * | |
302 | FcConfigGetCurrent (void); | |
303 | ||
179c3995 KP |
304 | FcBool |
305 | FcConfigUptoDate (FcConfig *config); | |
306 | ||
24330d27 KP |
307 | FcBool |
308 | FcConfigBuildFonts (FcConfig *config); | |
309 | ||
179c3995 KP |
310 | FcStrList * |
311 | FcConfigGetFontDirs (FcConfig *config); | |
312 | ||
313 | FcStrList * | |
314 | FcConfigGetConfigDirs (FcConfig *config); | |
24330d27 | 315 | |
179c3995 | 316 | FcStrList * |
24330d27 KP |
317 | FcConfigGetConfigFiles (FcConfig *config); |
318 | ||
ccb3e93b | 319 | FcChar8 * |
24330d27 KP |
320 | FcConfigGetCache (FcConfig *config); |
321 | ||
322 | FcBlanks * | |
323 | FcConfigGetBlanks (FcConfig *config); | |
324 | ||
179c3995 KP |
325 | int |
326 | FcConfigGetRescanInverval (FcConfig *config); | |
327 | ||
328 | FcBool | |
329 | FcConfigSetRescanInverval (FcConfig *config, int rescanInterval); | |
330 | ||
24330d27 KP |
331 | FcFontSet * |
332 | FcConfigGetFonts (FcConfig *config, | |
333 | FcSetName set); | |
334 | ||
335 | FcBool | |
336 | FcConfigAppFontAddFile (FcConfig *config, | |
ccb3e93b | 337 | const FcChar8 *file); |
24330d27 KP |
338 | |
339 | FcBool | |
340 | FcConfigAppFontAddDir (FcConfig *config, | |
ccb3e93b | 341 | const FcChar8 *dir); |
24330d27 KP |
342 | |
343 | void | |
344 | FcConfigAppFontClear (FcConfig *config); | |
345 | ||
fa244f3d KP |
346 | FcBool |
347 | FcConfigSubstituteWithPat (FcConfig *config, | |
348 | FcPattern *p, | |
349 | FcPattern *p_pat, | |
350 | FcMatchKind kind); | |
351 | ||
24330d27 KP |
352 | FcBool |
353 | FcConfigSubstitute (FcConfig *config, | |
354 | FcPattern *p, | |
355 | FcMatchKind kind); | |
356 | ||
357 | /* fccharset.c */ | |
358 | FcCharSet * | |
359 | FcCharSetCreate (void); | |
360 | ||
361 | void | |
362 | FcCharSetDestroy (FcCharSet *fcs); | |
363 | ||
364 | FcBool | |
365 | FcCharSetAddChar (FcCharSet *fcs, FcChar32 ucs4); | |
366 | ||
367 | FcCharSet * | |
368 | FcCharSetCopy (FcCharSet *src); | |
369 | ||
370 | FcBool | |
371 | FcCharSetEqual (const FcCharSet *a, const FcCharSet *b); | |
372 | ||
373 | FcCharSet * | |
374 | FcCharSetIntersect (const FcCharSet *a, const FcCharSet *b); | |
375 | ||
376 | FcCharSet * | |
377 | FcCharSetUnion (const FcCharSet *a, const FcCharSet *b); | |
378 | ||
379 | FcCharSet * | |
380 | FcCharSetSubtract (const FcCharSet *a, const FcCharSet *b); | |
381 | ||
382 | FcBool | |
383 | FcCharSetHasChar (const FcCharSet *fcs, FcChar32 ucs4); | |
384 | ||
385 | FcChar32 | |
386 | FcCharSetCount (const FcCharSet *a); | |
387 | ||
388 | FcChar32 | |
389 | FcCharSetIntersectCount (const FcCharSet *a, const FcCharSet *b); | |
390 | ||
391 | FcChar32 | |
392 | FcCharSetSubtractCount (const FcCharSet *a, const FcCharSet *b); | |
393 | ||
1412a699 KP |
394 | FcBool |
395 | FcCharSetIsSubset (const FcCharSet *a, const FcCharSet *b); | |
396 | ||
36732012 KP |
397 | #define FC_CHARSET_MAP_SIZE (256/32) |
398 | #define FC_CHARSET_DONE ((FcChar32) -1) | |
399 | ||
400 | FcChar32 | |
401 | FcCharSetFirstPage (const FcCharSet *a, | |
402 | FcChar32 map[FC_CHARSET_MAP_SIZE], | |
403 | FcChar32 *next); | |
404 | ||
aae6f7d4 | 405 | FcChar32 |
36732012 KP |
406 | FcCharSetNextPage (const FcCharSet *a, |
407 | FcChar32 map[FC_CHARSET_MAP_SIZE], | |
408 | FcChar32 *next); | |
409 | ||
aae6f7d4 | 410 | |
24330d27 | 411 | /* fcdbg.c */ |
9c8e07f1 | 412 | void |
938bc633 | 413 | FcValuePrint (const FcValue v); |
9c8e07f1 | 414 | |
24330d27 | 415 | void |
938bc633 | 416 | FcPatternPrint (const FcPattern *p); |
24330d27 | 417 | |
9c8e07f1 | 418 | void |
938bc633 | 419 | FcFontSetPrint (const FcFontSet *s); |
9c8e07f1 | 420 | |
24330d27 KP |
421 | /* fcdefault.c */ |
422 | void | |
423 | FcDefaultSubstitute (FcPattern *pattern); | |
424 | ||
425 | /* fcdir.c */ | |
426 | FcBool | |
ccb3e93b | 427 | FcFileScan (FcFontSet *set, |
179c3995 | 428 | FcStrSet *dirs, |
ccb3e93b KP |
429 | FcFileCache *cache, |
430 | FcBlanks *blanks, | |
431 | const FcChar8 *file, | |
432 | FcBool force); | |
24330d27 KP |
433 | |
434 | FcBool | |
ccb3e93b | 435 | FcDirScan (FcFontSet *set, |
179c3995 | 436 | FcStrSet *dirs, |
ccb3e93b KP |
437 | FcFileCache *cache, |
438 | FcBlanks *blanks, | |
439 | const FcChar8 *dir, | |
440 | FcBool force); | |
441 | ||
442 | FcBool | |
179c3995 KP |
443 | FcDirSave (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir); |
444 | ||
24330d27 KP |
445 | /* fcfreetype.c */ |
446 | FcPattern * | |
ccb3e93b | 447 | FcFreeTypeQuery (const FcChar8 *file, int id, FcBlanks *blanks, int *count); |
24330d27 KP |
448 | |
449 | /* fcfs.c */ | |
450 | ||
451 | FcFontSet * | |
452 | FcFontSetCreate (void); | |
453 | ||
454 | void | |
455 | FcFontSetDestroy (FcFontSet *s); | |
456 | ||
457 | FcBool | |
458 | FcFontSetAdd (FcFontSet *s, FcPattern *font); | |
459 | ||
460 | /* fcinit.c */ | |
179c3995 KP |
461 | FcConfig * |
462 | FcInitLoadConfig (void); | |
463 | ||
464 | FcConfig * | |
465 | FcInitLoadConfigAndFonts (void); | |
466 | ||
24330d27 | 467 | FcBool |
179c3995 | 468 | FcInit (void); |
24330d27 | 469 | |
34cd0514 CW |
470 | void |
471 | FcFini (void); | |
472 | ||
48db40f6 KP |
473 | int |
474 | FcGetVersion (void); | |
475 | ||
24330d27 | 476 | FcBool |
179c3995 | 477 | FcInitReinitialize (void); |
24330d27 KP |
478 | |
479 | FcBool | |
179c3995 | 480 | FcInitBringUptoDate (void); |
24330d27 | 481 | |
d8d73958 KP |
482 | /* fclang.c */ |
483 | FcLangSet * | |
484 | FcLangSetCreate (void); | |
485 | ||
486 | void | |
487 | FcLangSetDestroy (FcLangSet *ls); | |
488 | ||
489 | FcLangSet * | |
490 | FcLangSetCopy (const FcLangSet *ls); | |
491 | ||
492 | FcBool | |
493 | FcLangSetAdd (FcLangSet *ls, const FcChar8 *lang); | |
494 | ||
495 | FcLangResult | |
496 | FcLangSetHasLang (const FcLangSet *ls, const FcChar8 *lang); | |
497 | ||
498 | FcLangResult | |
499 | FcLangSetCompare (const FcLangSet *lsa, const FcLangSet *lsb); | |
500 | ||
4c2967f6 KP |
501 | FcBool |
502 | FcLangSetContains (const FcLangSet *lsa, const FcLangSet *lsb); | |
503 | ||
d8d73958 KP |
504 | FcBool |
505 | FcLangSetEqual (const FcLangSet *lsa, const FcLangSet *lsb); | |
506 | ||
507 | FcChar32 | |
508 | FcLangSetHash (const FcLangSet *ls); | |
509 | ||
24330d27 KP |
510 | /* fclist.c */ |
511 | FcObjectSet * | |
512 | FcObjectSetCreate (void); | |
513 | ||
514 | FcBool | |
515 | FcObjectSetAdd (FcObjectSet *os, const char *object); | |
516 | ||
517 | void | |
518 | FcObjectSetDestroy (FcObjectSet *os); | |
519 | ||
520 | FcObjectSet * | |
521 | FcObjectSetVaBuild (const char *first, va_list va); | |
522 | ||
523 | FcObjectSet * | |
524 | FcObjectSetBuild (const char *first, ...); | |
525 | ||
80c053b7 KP |
526 | FcFontSet * |
527 | FcFontSetList (FcConfig *config, | |
528 | FcFontSet **sets, | |
529 | int nsets, | |
530 | FcPattern *p, | |
531 | FcObjectSet *os); | |
532 | ||
24330d27 KP |
533 | FcFontSet * |
534 | FcFontList (FcConfig *config, | |
535 | FcPattern *p, | |
536 | FcObjectSet *os); | |
537 | ||
134f6011 KP |
538 | /* fcatomic.c */ |
539 | ||
540 | FcAtomic * | |
541 | FcAtomicCreate (const FcChar8 *file); | |
542 | ||
543 | FcBool | |
544 | FcAtomicLock (FcAtomic *atomic); | |
545 | ||
546 | FcChar8 * | |
547 | FcAtomicNewFile (FcAtomic *atomic); | |
548 | ||
549 | FcChar8 * | |
550 | FcAtomicOrigFile (FcAtomic *atomic); | |
551 | ||
552 | FcBool | |
553 | FcAtomicReplaceOrig (FcAtomic *atomic); | |
554 | ||
555 | void | |
556 | FcAtomicDeleteNew (FcAtomic *atomic); | |
557 | ||
558 | void | |
559 | FcAtomicUnlock (FcAtomic *atomic); | |
560 | ||
561 | void | |
562 | FcAtomicDestroy (FcAtomic *atomic); | |
563 | ||
24330d27 | 564 | /* fcmatch.c */ |
80c053b7 KP |
565 | FcPattern * |
566 | FcFontSetMatch (FcConfig *config, | |
567 | FcFontSet **sets, | |
568 | int nsets, | |
569 | FcPattern *p, | |
570 | FcResult *result); | |
571 | ||
24330d27 KP |
572 | FcPattern * |
573 | FcFontMatch (FcConfig *config, | |
574 | FcPattern *p, | |
575 | FcResult *result); | |
576 | ||
216fac98 KP |
577 | FcPattern * |
578 | FcFontRenderPrepare (FcConfig *config, | |
579 | FcPattern *pat, | |
580 | FcPattern *font); | |
581 | ||
582 | FcFontSet * | |
583 | FcFontSetSort (FcConfig *config, | |
584 | FcFontSet **sets, | |
585 | int nsets, | |
586 | FcPattern *p, | |
587 | FcBool trim, | |
588 | FcCharSet **csp, | |
589 | FcResult *result); | |
590 | ||
20ac65ab KP |
591 | FcFontSet * |
592 | FcFontSort (FcConfig *config, | |
593 | FcPattern *p, | |
594 | FcBool trim, | |
595 | FcCharSet **csp, | |
596 | FcResult *result); | |
597 | ||
1412a699 KP |
598 | void |
599 | FcFontSetSortDestroy (FcFontSet *fs); | |
600 | ||
24330d27 KP |
601 | /* fcmatrix.c */ |
602 | FcMatrix * | |
603 | FcMatrixCopy (const FcMatrix *mat); | |
604 | ||
605 | FcBool | |
606 | FcMatrixEqual (const FcMatrix *mat1, const FcMatrix *mat2); | |
607 | ||
608 | void | |
609 | FcMatrixMultiply (FcMatrix *result, const FcMatrix *a, const FcMatrix *b); | |
610 | ||
611 | void | |
612 | FcMatrixRotate (FcMatrix *m, double c, double s); | |
613 | ||
614 | void | |
615 | FcMatrixScale (FcMatrix *m, double sx, double sy); | |
616 | ||
617 | void | |
618 | FcMatrixShear (FcMatrix *m, double sh, double sv); | |
619 | ||
620 | /* fcname.c */ | |
621 | ||
622 | FcBool | |
623 | FcNameRegisterObjectTypes (const FcObjectType *types, int ntype); | |
624 | ||
625 | FcBool | |
626 | FcNameUnregisterObjectTypes (const FcObjectType *types, int ntype); | |
627 | ||
628 | const FcObjectType * | |
629 | FcNameGetObjectType (const char *object); | |
630 | ||
631 | FcBool | |
632 | FcNameRegisterConstants (const FcConstant *consts, int nconsts); | |
633 | ||
634 | FcBool | |
635 | FcNameUnregisterConstants (const FcConstant *consts, int nconsts); | |
636 | ||
637 | const FcConstant * | |
ccb3e93b | 638 | FcNameGetConstant (FcChar8 *string); |
24330d27 KP |
639 | |
640 | FcBool | |
ccb3e93b | 641 | FcNameConstant (FcChar8 *string, int *result); |
24330d27 KP |
642 | |
643 | FcPattern * | |
ccb3e93b | 644 | FcNameParse (const FcChar8 *name); |
24330d27 KP |
645 | |
646 | FcChar8 * | |
647 | FcNameUnparse (FcPattern *pat); | |
648 | ||
649 | /* fcpat.c */ | |
650 | FcPattern * | |
651 | FcPatternCreate (void); | |
652 | ||
653 | FcPattern * | |
bff80114 | 654 | FcPatternDuplicate (const FcPattern *p); |
24330d27 | 655 | |
6f6563ed KP |
656 | void |
657 | FcPatternReference (FcPattern *p); | |
658 | ||
24330d27 KP |
659 | void |
660 | FcValueDestroy (FcValue v); | |
661 | ||
0ab36ca8 KP |
662 | FcBool |
663 | FcValueEqual (FcValue va, FcValue vb); | |
664 | ||
24330d27 KP |
665 | FcValue |
666 | FcValueSave (FcValue v); | |
667 | ||
668 | void | |
669 | FcPatternDestroy (FcPattern *p); | |
670 | ||
0ab36ca8 | 671 | FcBool |
e9be9cd1 KP |
672 | FcPatternEqual (const FcPattern *pa, const FcPattern *pb); |
673 | ||
674 | FcBool | |
675 | FcPatternEqualSubset (const FcPattern *pa, const FcPattern *pb, const FcObjectSet *os); | |
0ab36ca8 | 676 | |
d0f07b8d KP |
677 | FcChar32 |
678 | FcPatternHash (const FcPattern *p); | |
679 | ||
24330d27 KP |
680 | FcBool |
681 | FcPatternAdd (FcPattern *p, const char *object, FcValue value, FcBool append); | |
682 | ||
82f4243f KP |
683 | FcBool |
684 | FcPatternAddWeak (FcPattern *p, const char *object, FcValue value, FcBool append); | |
685 | ||
24330d27 | 686 | FcResult |
bff80114 | 687 | FcPatternGet (const FcPattern *p, const char *object, int id, FcValue *v); |
24330d27 KP |
688 | |
689 | FcBool | |
690 | FcPatternDel (FcPattern *p, const char *object); | |
691 | ||
4f27c1c0 KP |
692 | FcBool |
693 | FcPatternRemove (FcPattern *p, const char *object, int id); | |
694 | ||
24330d27 KP |
695 | FcBool |
696 | FcPatternAddInteger (FcPattern *p, const char *object, int i); | |
697 | ||
698 | FcBool | |
699 | FcPatternAddDouble (FcPattern *p, const char *object, double d); | |
700 | ||
701 | FcBool | |
ccb3e93b | 702 | FcPatternAddString (FcPattern *p, const char *object, const FcChar8 *s); |
24330d27 KP |
703 | |
704 | FcBool | |
705 | FcPatternAddMatrix (FcPattern *p, const char *object, const FcMatrix *s); | |
706 | ||
707 | FcBool | |
708 | FcPatternAddCharSet (FcPattern *p, const char *object, const FcCharSet *c); | |
709 | ||
710 | FcBool | |
711 | FcPatternAddBool (FcPattern *p, const char *object, FcBool b); | |
712 | ||
d8d73958 KP |
713 | FcBool |
714 | FcPatternAddLangSet (FcPattern *p, const char *object, const FcLangSet *ls); | |
715 | ||
24330d27 | 716 | FcResult |
bff80114 | 717 | FcPatternGetInteger (const FcPattern *p, const char *object, int n, int *i); |
24330d27 KP |
718 | |
719 | FcResult | |
bff80114 | 720 | FcPatternGetDouble (const FcPattern *p, const char *object, int n, double *d); |
24330d27 KP |
721 | |
722 | FcResult | |
bff80114 | 723 | FcPatternGetString (const FcPattern *p, const char *object, int n, FcChar8 ** s); |
24330d27 KP |
724 | |
725 | FcResult | |
bff80114 | 726 | FcPatternGetMatrix (const FcPattern *p, const char *object, int n, FcMatrix **s); |
24330d27 KP |
727 | |
728 | FcResult | |
bff80114 | 729 | FcPatternGetCharSet (const FcPattern *p, const char *object, int n, FcCharSet **c); |
24330d27 KP |
730 | |
731 | FcResult | |
bff80114 | 732 | FcPatternGetBool (const FcPattern *p, const char *object, int n, FcBool *b); |
24330d27 | 733 | |
d8d73958 | 734 | FcResult |
bff80114 | 735 | FcPatternGetLangSet (const FcPattern *p, const char *object, int n, FcLangSet **ls); |
d8d73958 | 736 | |
24330d27 KP |
737 | FcPattern * |
738 | FcPatternVaBuild (FcPattern *orig, va_list va); | |
739 | ||
740 | FcPattern * | |
741 | FcPatternBuild (FcPattern *orig, ...); | |
742 | ||
743 | /* fcstr.c */ | |
744 | ||
ccb3e93b KP |
745 | FcChar8 * |
746 | FcStrCopy (const FcChar8 *s); | |
24330d27 | 747 | |
179c3995 KP |
748 | FcChar8 * |
749 | FcStrCopyFilename (const FcChar8 *s); | |
750 | ||
4c2967f6 KP |
751 | #define FcIsUpper(c) (('A' <= (c) && (c) <= 'Z')) |
752 | #define FcIsLower(c) (('a' <= (c) && (c) <= 'z')) | |
753 | #define FcToLower(c) (FcIsUpper(c) ? (c) - 'A' + 'a' : (c)) | |
24330d27 KP |
754 | |
755 | int | |
ccb3e93b | 756 | FcStrCmpIgnoreCase (const FcChar8 *s1, const FcChar8 *s2); |
24330d27 | 757 | |
179c3995 KP |
758 | int |
759 | FcStrCmp (const FcChar8 *s1, const FcChar8 *s2); | |
760 | ||
d4d1e8bc JS |
761 | const FcChar8 * |
762 | FcStrStrIgnoreCase (const FcChar8 *s1, const FcChar8 *s2); | |
763 | ||
764 | const FcChar8 * | |
765 | FcStrStr (const FcChar8 *s1, const FcChar8 *s2); | |
766 | ||
24330d27 | 767 | int |
0f9a306e KP |
768 | FcUtf8ToUcs4 (const FcChar8 *src_orig, |
769 | FcChar32 *dst, | |
770 | int len); | |
24330d27 KP |
771 | |
772 | FcBool | |
0f9a306e KP |
773 | FcUtf8Len (const FcChar8 *string, |
774 | int len, | |
775 | int *nchar, | |
776 | int *wchar); | |
24330d27 | 777 | |
69937bd9 KP |
778 | #define FC_UTF8_MAX_LEN 6 |
779 | ||
780 | int | |
781 | FcUcs4ToUtf8 (FcChar32 ucs4, | |
782 | FcChar8 dest[FC_UTF8_MAX_LEN]); | |
783 | ||
784 | int | |
0f9a306e KP |
785 | FcUtf16ToUcs4 (const FcChar8 *src_orig, |
786 | FcEndian endian, | |
787 | FcChar32 *dst, | |
788 | int len); /* in bytes */ | |
69937bd9 KP |
789 | |
790 | FcBool | |
0f9a306e KP |
791 | FcUtf16Len (const FcChar8 *string, |
792 | FcEndian endian, | |
793 | int len, /* in bytes */ | |
794 | int *nchar, | |
795 | int *wchar); | |
69937bd9 | 796 | |
179c3995 KP |
797 | FcChar8 * |
798 | FcStrDirname (const FcChar8 *file); | |
799 | ||
800 | FcChar8 * | |
801 | FcStrBasename (const FcChar8 *file); | |
802 | ||
803 | FcStrSet * | |
804 | FcStrSetCreate (void); | |
805 | ||
806 | FcBool | |
807 | FcStrSetMember (FcStrSet *set, const FcChar8 *s); | |
808 | ||
d8d73958 KP |
809 | FcBool |
810 | FcStrSetEqual (FcStrSet *sa, FcStrSet *sb); | |
811 | ||
179c3995 KP |
812 | FcBool |
813 | FcStrSetAdd (FcStrSet *set, const FcChar8 *s); | |
814 | ||
815 | FcBool | |
816 | FcStrSetAddFilename (FcStrSet *set, const FcChar8 *s); | |
817 | ||
818 | FcBool | |
819 | FcStrSetDel (FcStrSet *set, const FcChar8 *s); | |
820 | ||
821 | void | |
822 | FcStrSetDestroy (FcStrSet *set); | |
823 | ||
824 | FcStrList * | |
825 | FcStrListCreate (FcStrSet *set); | |
826 | ||
827 | FcChar8 * | |
828 | FcStrListNext (FcStrList *list); | |
829 | ||
830 | void | |
831 | FcStrListDone (FcStrList *list); | |
832 | ||
24330d27 KP |
833 | /* fcxml.c */ |
834 | FcBool | |
ccb3e93b | 835 | FcConfigParseAndLoad (FcConfig *config, const FcChar8 *file, FcBool complain); |
24330d27 KP |
836 | |
837 | _FCFUNCPROTOEND | |
838 | ||
839 | #endif /* _FONTCONFIG_H_ */ |