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