]> git.wh0rd.org Git - fontconfig.git/blob - src/fcint.h
Forward port cworth's patch to branch.
[fontconfig.git] / src / fcint.h
1 /*
2  * $RCSId: xc/lib/fontconfig/src/fcint.h,v 1.27 2002/08/31 22:17:32 keithp Exp $
3  *
4  * Copyright © 2000 Keith Packard
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 _FCINT_H_
26 #define _FCINT_H_
27
28 #include <stdlib.h>
29 #include <stdio.h>
30 #include <string.h>
31 #include <ctype.h>
32 #include <errno.h>
33 #include <unistd.h>
34 #include <sys/types.h>
35 #include <sys/stat.h>
36 #include <time.h>
37 #include <fontconfig/fontconfig.h>
38 #include <fontconfig/fcprivate.h>
39 #include <fontconfig/fcfreetype.h>
40 #ifdef HAVE_CONFIG_H
41 #include <config.h>
42 #endif
43
44 /* unused */
45 typedef struct _FcSymbolic {
46     const char  *name;
47     int         value;
48 } FcSymbolic;
49
50 #ifndef FC_CONFIG_PATH
51 #define FC_CONFIG_PATH "fonts.conf"
52 #endif
53
54 #define FC_FONT_FILE_INVALID    ((FcChar8 *) ".")
55 #define FC_FONT_FILE_DIR        ((FcChar8 *) ".dir")
56
57 #ifdef _WIN32
58 #define FC_SEARCH_PATH_SEPARATOR ';'
59 #else
60 #define FC_SEARCH_PATH_SEPARATOR ':'
61 #endif
62
63 #define FC_DBG_MATCH    1
64 #define FC_DBG_MATCHV   2
65 #define FC_DBG_EDIT     4
66 #define FC_DBG_FONTSET  8
67 #define FC_DBG_CACHE    16
68 #define FC_DBG_CACHEV   32
69 #define FC_DBG_PARSE    64
70 #define FC_DBG_SCAN     128
71 #define FC_DBG_SCANV    256
72 #define FC_DBG_MEMORY   512
73 #define FC_DBG_CONFIG   1024
74
75 #define FC_MEM_CHARSET      0
76 #define FC_MEM_CHARLEAF     1
77 #define FC_MEM_FONTSET      2
78 #define FC_MEM_FONTPTR      3
79 #define FC_MEM_OBJECTSET    4
80 #define FC_MEM_OBJECTPTR    5
81 #define FC_MEM_MATRIX       6
82 #define FC_MEM_PATTERN      7
83 #define FC_MEM_PATELT       8
84 #define FC_MEM_VALLIST      9
85 #define FC_MEM_SUBSTATE     10
86 #define FC_MEM_STRING       11
87 #define FC_MEM_LISTBUCK     12
88 #define FC_MEM_STRSET       13
89 #define FC_MEM_STRLIST      14
90 #define FC_MEM_CONFIG       15
91 #define FC_MEM_LANGSET      16
92 #define FC_MEM_ATOMIC       17
93 #define FC_MEM_BLANKS       18
94 #define FC_MEM_CACHE        19
95 #define FC_MEM_STRBUF       20
96 #define FC_MEM_SUBST        21
97 #define FC_MEM_OBJECTTYPE   22
98 #define FC_MEM_CONSTANT     23
99 #define FC_MEM_TEST         24
100 #define FC_MEM_EXPR         25
101 #define FC_MEM_VSTACK       26
102 #define FC_MEM_ATTR         27
103 #define FC_MEM_PSTACK       28
104 #define FC_MEM_STATICSTR    29
105
106 #define FC_MEM_NUM          30
107
108 typedef enum _FcValueBinding {
109     FcValueBindingWeak, FcValueBindingStrong, FcValueBindingSame
110 } FcValueBinding;
111
112 typedef struct _FcStrSetPtr {
113     FcStorage               storage;
114     union {
115         int                 stat;
116         struct _FcStrSet    *dyn;
117     } u;
118 } FcStrSetPtr;
119
120 typedef struct _FcValueListPtr {
121     FcStorage               storage;
122     union {
123         int                 stat;
124         struct _FcValueList *dyn;
125     } u;
126 } FcValueListPtr;
127
128 typedef struct _FcValueList {
129     FcValueListPtr          next;
130
131     FcValue                 value;
132     FcValueBinding          binding;
133 } FcValueList;
134
135 typedef struct _FcPatternEltPtr {
136     FcStorage               storage;
137     union {
138         int                 stat;
139         struct _FcPatternElt *dyn;
140     } u;
141 } FcPatternEltPtr;
142
143 typedef struct _FcPatternElt {
144     FcObjectPtr             object;
145     FcValueListPtr          values;
146 } FcPatternElt;
147
148 struct _FcPattern {
149     int             num;
150     int             size;
151     FcPatternEltPtr elts;
152     int             ref;
153 };
154
155 typedef enum _FcOp {
156     FcOpInteger, FcOpDouble, FcOpString, FcOpMatrix, FcOpBool, FcOpCharSet, 
157     FcOpNil,
158     FcOpField, FcOpConst,
159     FcOpAssign, FcOpAssignReplace, 
160     FcOpPrependFirst, FcOpPrepend, FcOpAppend, FcOpAppendLast,
161     FcOpQuest,
162     FcOpOr, FcOpAnd, FcOpEqual, FcOpNotEqual, 
163     FcOpContains, FcOpListing, FcOpNotContains,
164     FcOpLess, FcOpLessEqual, FcOpMore, FcOpMoreEqual,
165     FcOpPlus, FcOpMinus, FcOpTimes, FcOpDivide,
166     FcOpNot, FcOpComma, FcOpFloor, FcOpCeil, FcOpRound, FcOpTrunc,
167     FcOpInvalid
168 } FcOp;
169
170 typedef struct _FcExpr {
171     FcOp   op;
172     union {
173         int         ival;
174         double      dval;
175         FcChar8     *sval;
176         FcMatrix    *mval;
177         FcBool      bval;
178         FcCharSet   *cval;
179         char        *field;
180         FcChar8     *constant;
181         struct {
182             struct _FcExpr *left, *right;
183         } tree;
184     } u;
185 } FcExpr;
186
187 typedef enum _FcQual {
188     FcQualAny, FcQualAll, FcQualFirst, FcQualNotFirst
189 } FcQual;
190
191 #define FcMatchDefault  ((FcMatchKind) -1)
192
193 typedef struct _FcTest {
194     struct _FcTest      *next;
195     FcMatchKind         kind;
196     FcQual              qual;
197     const char          *field;
198     FcOp                op;
199     FcExpr              *expr;
200 } FcTest;
201
202 typedef struct _FcEdit {
203     struct _FcEdit *next;
204     const char      *field;
205     FcOp            op;
206     FcExpr          *expr;
207     FcValueBinding  binding;
208 } FcEdit;
209
210 typedef struct _FcSubst {
211     struct _FcSubst     *next;
212     FcTest              *test;
213     FcEdit              *edit;
214 } FcSubst;
215
216 typedef struct _FcCharLeaf {
217     FcChar32    map[256/32];
218 } FcCharLeaf;
219
220 #define FC_REF_CONSTANT     -1
221
222 struct _FcCharSet {
223     int             ref;        /* reference count */
224     int             num;        /* size of leaves and numbers arrays */
225     FcStorage       storage;
226     union {
227         struct {
228             FcCharLeaf  **leaves;
229             FcChar16    *numbers;
230         } dyn;
231         struct {
232             int         leafidx_offset;
233             int         numbers_offset;
234         } stat;
235     } u;
236 };
237
238 struct _FcStrSet {
239     int             ref;        /* reference count */
240     int             num;
241     int             size;
242     FcStorage       storage;
243     union {
244         FcChar8     **strs;
245         int         stridx_offset;
246     } u;
247 };
248
249 struct _FcStrList {
250     FcStrSet        *set;
251     int             n;
252 };
253
254 typedef struct _FcStrBuf {
255     FcChar8 *buf;
256     FcBool  allocated;
257     FcBool  failed;
258     int     len;
259     int     size;
260 } FcStrBuf;
261
262 /*
263  * To map adobe glyph names to unicode values, a precomputed hash
264  * table is used
265  */
266
267 typedef struct _FcGlyphName {
268     FcChar32    ucs;            /* unicode value */
269     FcChar8     name[1];        /* name extends beyond struct */
270 } FcGlyphName;
271
272 /*
273  * To perform case-insensitive string comparisons, a table
274  * is used which holds three different kinds of folding data.
275  * 
276  * The first is a range of upper case values mapping to a range
277  * of their lower case equivalents.  Within each range, the offset
278  * between upper and lower case is constant.
279  *
280  * The second is a range of upper case values which are interleaved
281  * with their lower case equivalents.
282  * 
283  * The third is a set of raw unicode values mapping to a list
284  * of unicode values for comparison purposes.  This allows conversion
285  * of ß to "ss" so that SS, ss and ß all match.  A separate array
286  * holds the list of unicode values for each entry.
287  *
288  * These are packed into a single table.  Using a binary search,
289  * the appropriate entry can be located.
290  */
291
292 #define FC_CASE_FOLD_RANGE          0
293 #define FC_CASE_FOLD_EVEN_ODD       1
294 #define FC_CASE_FOLD_FULL           2
295
296 typedef struct _FcCaseFold {
297     FcChar32    upper;
298     FcChar16    method : 2;
299     FcChar16    count : 14;
300     short       offset;     /* lower - upper for RANGE, table id for FULL */
301 } FcCaseFold;
302
303 #define FC_MAX_FILE_LEN     4096
304
305 /*
306  * The per-user ~/.fonts.cache-<version> file is loaded into
307  * this data structure.  Each directory gets a substructure
308  * which is validated by comparing the directory timestamp with
309  * that saved in the cache.  When valid, the entire directory cache
310  * can be immediately loaded without reading the directory.  Otherwise,
311  * the files are checked individually; updated files are loaded into the
312  * cache which is then rewritten to the users home directory
313  */
314
315 #define FC_GLOBAL_CACHE_DIR_HASH_SIZE       37
316 #define FC_GLOBAL_CACHE_FILE_HASH_SIZE      67
317
318 typedef struct _FcGlobalCacheInfo {
319     unsigned int                hash;
320     FcChar8                     *file;
321     time_t                      time;
322     FcBool                      referenced;
323 } FcGlobalCacheInfo;
324
325 typedef struct _FcGlobalCacheFile {
326     struct _FcGlobalCacheFile   *next;
327     FcGlobalCacheInfo           info;
328     int                         id;
329     FcChar8                     *name;
330 } FcGlobalCacheFile;
331
332 typedef struct _FcGlobalCacheDir FcGlobalCacheDir;
333
334 typedef struct _FcGlobalCacheSubdir {
335     struct _FcGlobalCacheSubdir *next;
336     FcGlobalCacheDir            *ent;
337 } FcGlobalCacheSubdir;
338
339 struct _FcGlobalCacheDir {
340     struct _FcGlobalCacheDir    *next;
341     FcGlobalCacheInfo           info;
342     int                         len;
343     FcGlobalCacheFile           *ents[FC_GLOBAL_CACHE_FILE_HASH_SIZE];
344     FcGlobalCacheSubdir         *subdirs;
345 };
346
347 typedef struct _FcGlobalCache {
348     FcGlobalCacheDir            *ents[FC_GLOBAL_CACHE_DIR_HASH_SIZE];
349     FcBool                      updated;
350     FcBool                      broken;
351     int                         entries;
352     int                         referenced;
353 } FcGlobalCache;
354
355 struct _FcAtomic {
356     FcChar8     *file;          /* original file name */
357     FcChar8     *new;           /* temp file name -- write data here */
358     FcChar8     *lck;           /* lockfile name (used for locking) */
359     FcChar8     *tmp;           /* tmpfile name (used for locking) */
360 };
361
362 struct _FcBlanks {
363     int         nblank;
364     int         sblank;
365     FcChar32    *blanks;
366 };
367
368 struct _FcConfig {
369     /*
370      * File names loaded from the configuration -- saved here as the
371      * cache file must be consulted before the directories are scanned,
372      * and those directives may occur in any order
373      */
374     FcStrSet    *configDirs;        /* directories to scan for fonts */
375     FcChar8     *cache;             /* name of per-user cache file */
376     /*
377      * Set of allowed blank chars -- used to
378      * trim fonts of bogus glyphs
379      */
380     FcBlanks    *blanks;
381     /*
382      * List of directories containing fonts,
383      * built by recursively scanning the set 
384      * of configured directories
385      */
386     FcStrSet    *fontDirs;
387     /*
388      * Names of all of the configuration files used
389      * to create this configuration
390      */
391     FcStrSet    *configFiles;       /* config files loaded */
392     /*
393      * Substitution instructions for patterns and fonts;
394      * maxObjects is used to allocate appropriate intermediate storage
395      * while performing a whole set of substitutions
396      */
397     FcSubst     *substPattern;      /* substitutions for patterns */
398     FcSubst     *substFont;         /* substitutions for fonts */
399     int         maxObjects;         /* maximum number of tests in all substs */
400     /*
401      * List of patterns used to control font file selection
402      */
403     FcStrSet    *acceptGlobs;
404     FcStrSet    *rejectGlobs;
405     FcFontSet   *acceptPatterns;
406     FcFontSet   *rejectPatterns;
407     /*
408      * The set of fonts loaded from the listed directories; the
409      * order within the set does not determine the font selection,
410      * except in the case of identical matches in which case earlier fonts
411      * match preferrentially
412      */
413     FcFontSet   *fonts[FcSetApplication + 1];
414     /*
415      * Fontconfig can periodically rescan the system configuration
416      * and font directories.  This rescanning occurs when font
417      * listing requests are made, but no more often than rescanInterval
418      * seconds apart.
419      */
420     time_t      rescanTime;         /* last time information was scanned */
421     int         rescanInterval;     /* interval between scans */
422 };
423  
424 extern FcConfig *_fcConfig;
425
426 typedef struct _FcCharMap FcCharMap;
427
428 /* fcblanks.c */
429
430 /* fccache.c */
431
432 FcGlobalCache *
433 FcGlobalCacheCreate (void);
434
435 void
436 FcGlobalCacheDestroy (FcGlobalCache *cache);
437
438 FcBool
439 FcGlobalCacheCheckTime (const FcChar8*file, FcGlobalCacheInfo *info);
440
441 void
442 FcGlobalCacheReferenced (FcGlobalCache      *cache,
443                          FcGlobalCacheInfo  *info);
444
445 void
446 FcGlobalCacheReferenceSubdir (FcGlobalCache *cache,
447                               const FcChar8 *dir);
448
449 FcGlobalCacheDir *
450 FcGlobalCacheDirGet (FcGlobalCache  *cache,
451                      const FcChar8  *dir,
452                      int            len,
453                      FcBool         create_missing);
454
455 FcBool
456 FcGlobalCacheScanDir (FcFontSet         *set,
457                       FcStrSet          *dirs,
458                       FcGlobalCache     *cache,
459                       const FcChar8     *dir,
460                       FcConfig          *config);
461
462 FcGlobalCacheFile *
463 FcGlobalCacheFileGet (FcGlobalCache *cache,
464                       const FcChar8 *file,
465                       int           id,
466                       int           *count);
467
468
469 void
470 FcGlobalCacheLoad (FcGlobalCache    *cache,
471                    const FcChar8    *cache_file);
472
473 FcBool
474 FcGlobalCacheUpdate (FcGlobalCache  *cache,
475                      const FcChar8  *file,
476                      int            id,
477                      const FcChar8  *name);
478
479 FcBool
480 FcGlobalCacheSave (FcGlobalCache    *cache,
481                    const FcChar8    *cache_file);
482
483 FcBool
484 FcDirCacheReadDir (FcFontSet        *set, 
485                    FcStrSet         *dirs,
486                    const FcChar8    *dir,
487                    FcConfig         *config);
488
489 FcBool
490 FcDirCacheWriteDir (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir);
491     
492 /* fccfg.c */
493
494 FcBool
495 FcConfigAddConfigDir (FcConfig      *config,
496                       const FcChar8 *d);
497
498 FcBool
499 FcConfigAddFontDir (FcConfig        *config,
500                     const FcChar8   *d);
501
502 FcBool
503 FcConfigAddDir (FcConfig        *config,
504                 const FcChar8   *d);
505
506 FcBool
507 FcConfigAddConfigFile (FcConfig         *config,
508                        const FcChar8    *f);
509
510 FcBool
511 FcConfigSetCache (FcConfig      *config,
512                   const FcChar8 *c);
513
514 FcBool
515 FcConfigAddBlank (FcConfig      *config,
516                   FcChar32      blank);
517
518 FcBool
519 FcConfigAddEdit (FcConfig       *config,
520                  FcTest         *test,
521                  FcEdit         *edit,
522                  FcMatchKind    kind);
523
524 void
525 FcConfigSetFonts (FcConfig      *config,
526                   FcFontSet     *fonts,
527                   FcSetName     set);
528
529 FcBool
530 FcConfigCompareValue (const FcValue m,
531                       FcOp          op,
532                       const FcValue v);
533
534 FcBool
535 FcConfigGlobAdd (FcConfig       *config,
536                  const FcChar8  *glob,
537                  FcBool         accept);
538
539 FcBool
540 FcConfigAcceptFilename (FcConfig        *config,
541                         const FcChar8   *filename);
542
543 FcBool
544 FcConfigPatternsAdd (FcConfig   *config,
545                      FcPattern  *pattern,
546                      FcBool     accept);
547
548 FcBool
549 FcConfigAcceptFont (FcConfig        *config,
550                     const FcPattern *font);
551
552 /* fccharset.c */
553 FcCharSet *
554 FcCharSetFreeze (FcCharSet *cs);
555
556 void
557 FcCharSetThawAll (void);
558
559 FcBool
560 FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c);
561
562 FcCharSet *
563 FcNameParseCharSet (FcChar8 *string);
564
565 FcCharLeaf *
566 FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4);
567
568 void
569 FcCharSetPtrDestroy (FcCharSetPtr fcs);
570
571 void
572 FcCharSetClearStatic(void);
573
574 FcBool
575 FcCharSetPrepareSerialize(FcCharSet *c);
576
577 FcCharSetPtr
578 FcCharSetSerialize(FcCharSet *c);
579
580 FcCharSetPtr
581 FcCharSetPtrCreateDynamic(FcCharSet *c);
582
583 FcCharLeaf *
584 FcCharSetGetLeaf(const FcCharSet *c, int i);
585
586 FcChar16 *
587 FcCharSetGetNumbers(const FcCharSet *c);
588
589 /* fcdbg.c */
590 void
591 FcValueListPrint (const FcValueListPtr l);
592
593 void
594 FcLangSetPrint (const FcLangSet *ls);
595
596 void
597 FcOpPrint (FcOp op);
598
599 void
600 FcTestPrint (const FcTest *test);
601
602 void
603 FcExprPrint (const FcExpr *expr);
604
605 void
606 FcEditPrint (const FcEdit *edit);
607
608 void
609 FcSubstPrint (const FcSubst *subst);
610
611 int
612 FcDebug (void);
613
614 FcCharSet *
615 FcCharSetPtrU (FcCharSetPtr mi);
616
617 /* fcdir.c */
618
619 FcBool
620 FcFileIsDir (const FcChar8 *file);
621
622 FcBool
623 FcFileScanConfig (FcFontSet     *set,
624                   FcStrSet      *dirs,
625                   FcFileCache   *cache,
626                   FcBlanks      *blanks,
627                   const FcChar8 *file,
628                   FcBool        force,
629                   FcConfig      *config);
630
631 FcBool
632 FcDirScanConfig (FcFontSet      *set,
633                  FcStrSet       *dirs,
634                  FcFileCache    *cache,
635                  FcBlanks       *blanks,
636                  const FcChar8  *dir,
637                  FcBool         force,
638                  FcConfig       *config);
639
640 /* fcfont.c */
641 int
642 FcFontDebug (void);
643     
644 /* fcfreetype.c */
645 FcBool
646 FcFreeTypeIsExclusiveLang (const FcChar8  *lang);
647
648 FcBool
649 FcFreeTypeHasLang (FcPattern *pattern, const FcChar8 *lang);
650
651 FcChar32
652 FcFreeTypeUcs4ToPrivate (FcChar32 ucs4, const FcCharMap *map);
653
654 FcChar32
655 FcFreeTypePrivateToUcs4 (FcChar32 private, const FcCharMap *map);
656
657 const FcCharMap *
658 FcFreeTypeGetPrivateMap (FT_Encoding encoding);
659     
660 /* fcfs.c */
661
662 void
663 FcFontSetClearStatic (void);
664
665 FcBool
666 FcFontSetPrepareSerialize (FcFontSet * s);
667
668 FcBool
669 FcFontSetSerialize (FcFontSet * s);
670
671 /* fcgram.y */
672 int
673 FcConfigparse (void);
674
675 int
676 FcConfigwrap (void);
677     
678 void
679 FcConfigerror (char *fmt, ...);
680     
681 char *
682 FcConfigSaveField (const char *field);
683
684 void
685 FcTestDestroy (FcTest *test);
686
687 FcExpr *
688 FcExprCreateInteger (int i);
689
690 FcExpr *
691 FcExprCreateDouble (double d);
692
693 FcExpr *
694 FcExprCreateString (const FcChar8 *s);
695
696 FcExpr *
697 FcExprCreateMatrix (const FcMatrix *m);
698
699 FcExpr *
700 FcExprCreateBool (FcBool b);
701
702 FcExpr *
703 FcExprCreateNil (void);
704
705 FcExpr *
706 FcExprCreateField (const char *field);
707
708 FcExpr *
709 FcExprCreateConst (const FcChar8 *constant);
710
711 FcExpr *
712 FcExprCreateOp (FcExpr *left, FcOp op, FcExpr *right);
713
714 void
715 FcExprDestroy (FcExpr *e);
716
717 void
718 FcEditDestroy (FcEdit *e);
719
720 /* fcinit.c */
721
722 void
723 FcMemReport (void);
724
725 void
726 FcMemAlloc (int kind, int size);
727
728 void
729 FcMemFree (int kind, int size);
730
731 /* fclang.c */
732 FcLangSet *
733 FcFreeTypeLangSet (const FcCharSet  *charset, 
734                    const FcChar8    *exclusiveLang);
735
736 FcLangResult
737 FcLangCompare (const FcChar8 *s1, const FcChar8 *s2);
738     
739 const FcCharSet *
740 FcCharSetForLang (const FcChar8 *lang);
741
742 FcLangSet *
743 FcLangSetPromote (const FcChar8 *lang);
744
745 FcLangSet *
746 FcNameParseLangSet (const FcChar8 *string);
747
748 FcBool
749 FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls);
750
751 void
752 FcLangSetClearStatic (void);
753
754 FcBool
755 FcLangSetPrepareSerialize (FcLangSet *l);
756
757 FcLangSetPtr
758 FcLangSetSerialize (FcLangSet *l);
759
760 FcLangSet *
761 FcLangSetPtrU (FcLangSetPtr li);
762
763 FcLangSetPtr
764 FcLangSetPtrCreateDynamic (FcLangSet *l);
765
766 void
767 FcLangSetPtrDestroy (FcLangSetPtr li);
768
769 /* fclist.c */
770
771 FcBool
772 FcListPatternMatchAny (const FcPattern *p,
773                        const FcPattern *font);
774
775 /* fcmatch.c */
776
777 /* fcmmap.c */
778
779 void
780 FcCacheClearStatic(void);
781
782 FcBool
783 FcCachePrepareSerialize(FcConfig * config);
784
785 FcBool
786 FcCacheSerialize (FcConfig * config);
787
788
789 /* fcname.c */
790
791 FcBool
792 FcNameBool (const FcChar8 *v, FcBool *result);
793
794 /* fcpat.c */
795 void
796 FcValueListDestroy (FcValueListPtr l);
797
798 FcPatternElt *
799 FcPatternFindElt (const FcPattern *p, const char *object);
800
801 FcPatternElt *
802 FcPatternInsertElt (FcPattern *p, const char *object);
803
804 FcBool
805 FcPatternAddWithBinding  (FcPattern         *p,
806                           const char        *object,
807                           FcValue           value,
808                           FcValueBinding    binding,
809                           FcBool            append);
810
811 FcPattern *
812 FcPatternFreeze (FcPattern *p);
813
814 void
815 FcPatternFini (void);
816
817 FcBool
818 FcPatternAppend (FcPattern *p, FcPattern *s);
819
820 void
821 FcObjectClearStatic(void);
822
823 FcObjectPtr
824 FcObjectStaticName (const char *name);
825
826 FcBool
827 FcObjectPrepareSerialize (FcObjectPtr si);
828
829 const char *
830 FcObjectPtrU (FcObjectPtr p);
831
832 int
833 FcObjectPtrCompare (FcObjectPtr a, FcObjectPtr b);
834
835 FcObjectPtr
836 FcObjectPtrCreateDynamic (const char * s);
837
838 void
839 FcObjectPtrDestroy (FcObjectPtr p);
840
841 FcBool
842 FcPatternPrepareSerialize (FcPattern *p);
843
844 void
845 FcValueListClearStatic (void);
846
847 void
848 FcPatternClearStatic (void);
849
850 FcValueList * 
851 FcValueListPtrU(FcValueListPtr p);
852
853 FcPatternElt *
854 FcPatternEltU (FcPatternEltPtr pei);
855
856 FcValueListPtr
857 FcValueListPtrCreateDynamic(FcValueList * p);
858
859 FcBool
860 FcValueListPrepareSerialize (FcValueList *p);
861
862 FcValueListPtr
863 FcValueListSerialize(FcValueList *pi);
864
865 FcPattern *
866 FcPatternSerialize (FcPattern * p);
867
868 /* fcrender.c */
869
870 /* fcmatrix.c */
871
872 extern const FcMatrixPtr    FcIdentityMatrix;
873
874 void
875 FcMatrixFree (FcMatrix *mat);
876
877 void
878 FcMatrixPtrDestroy (FcMatrixPtr mi);
879
880 FcBool
881 FcMatrixPrepareSerialize(FcMatrix *m);
882
883 FcMatrixPtr
884 FcMatrixSerialize(FcMatrix *m);
885
886 FcMatrix *
887 FcMatrixPtrU (FcMatrixPtr mi);
888
889 FcMatrixPtr
890 FcMatrixPtrCreateDynamic (FcMatrix *m);
891
892 void 
893 FcMatrixClearStatic (void);
894
895 /* fcstr.c */
896 FcStrSet *
897 FcStrSetPtrU (const FcStrSetPtr set);
898
899 FcStrSetPtr
900 FcStrSetPtrCreateDynamic (const FcStrSet * set);
901
902 void
903 FcStrSetClearStatic (void);
904
905 FcBool
906 FcStrSetPrepareSerialize (const FcStrSet *set);
907
908 void
909 FcStrSetSort (FcStrSet * set);
910
911 FcChar8 *
912 FcStrSetGet (const FcStrSet *set, int i);
913
914 FcChar8 *
915 FcStrPlus (const FcChar8 *s1, const FcChar8 *s2);
916     
917 void
918 FcStrFree (FcChar8 *s);
919
920 void
921 FcStrBufInit (FcStrBuf *buf, FcChar8 *init, int size);
922
923 void
924 FcStrBufDestroy (FcStrBuf *buf);
925
926 FcChar8 *
927 FcStrBufDone (FcStrBuf *buf);
928
929 FcBool
930 FcStrBufChar (FcStrBuf *buf, FcChar8 c);
931
932 FcBool
933 FcStrBufString (FcStrBuf *buf, const FcChar8 *s);
934
935 FcBool
936 FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len);
937
938 FcStrSetPtr
939 FcStrSetSerialize (FcStrSet *set);
940
941 int
942 FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
943
944 const FcChar8 *
945 FcStrContainsIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
946
947 const FcChar8 *
948 FcStrContainsIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
949
950 FcBool
951 FcStrUsesHome (const FcChar8 *s);
952
953 FcChar8 *
954 FcStrLastSlash (const FcChar8  *path);
955
956 FcChar32
957 FcStrHashIgnoreCase (const FcChar8 *s);
958
959 #endif /* _FC_INT_H_ */