]> git.wh0rd.org - fontconfig.git/blob - src/fcint.h
Update documentation -- fc-cache's man page now says that you need to run
[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 #ifndef FC_CONFIG_PATH
45 #define FC_CONFIG_PATH "fonts.conf"
46 #endif
47
48 #define FC_FONT_FILE_INVALID ((FcChar8 *) ".")
49 #define FC_FONT_FILE_DIR ((FcChar8 *) ".dir")
50
51 #ifdef _WIN32
52 #define FC_SEARCH_PATH_SEPARATOR ';'
53 #else
54 #define FC_SEARCH_PATH_SEPARATOR ':'
55 #endif
56
57 #define FC_DBG_MATCH 1
58 #define FC_DBG_MATCHV 2
59 #define FC_DBG_EDIT 4
60 #define FC_DBG_FONTSET 8
61 #define FC_DBG_CACHE 16
62 #define FC_DBG_CACHEV 32
63 #define FC_DBG_PARSE 64
64 #define FC_DBG_SCAN 128
65 #define FC_DBG_SCANV 256
66 #define FC_DBG_MEMORY 512
67 #define FC_DBG_CONFIG 1024
68
69 #define FC_MEM_CHARSET 0
70 #define FC_MEM_CHARLEAF 1
71 #define FC_MEM_FONTSET 2
72 #define FC_MEM_FONTPTR 3
73 #define FC_MEM_OBJECTSET 4
74 #define FC_MEM_OBJECTPTR 5
75 #define FC_MEM_MATRIX 6
76 #define FC_MEM_PATTERN 7
77 #define FC_MEM_PATELT 8
78 #define FC_MEM_VALLIST 9
79 #define FC_MEM_SUBSTATE 10
80 #define FC_MEM_STRING 11
81 #define FC_MEM_LISTBUCK 12
82 #define FC_MEM_STRSET 13
83 #define FC_MEM_STRLIST 14
84 #define FC_MEM_CONFIG 15
85 #define FC_MEM_LANGSET 16
86 #define FC_MEM_ATOMIC 17
87 #define FC_MEM_BLANKS 18
88 #define FC_MEM_CACHE 19
89 #define FC_MEM_STRBUF 20
90 #define FC_MEM_SUBST 21
91 #define FC_MEM_OBJECTTYPE 22
92 #define FC_MEM_CONSTANT 23
93 #define FC_MEM_TEST 24
94 #define FC_MEM_EXPR 25
95 #define FC_MEM_VSTACK 26
96 #define FC_MEM_ATTR 27
97 #define FC_MEM_PSTACK 28
98 #define FC_MEM_STATICSTR 29
99
100 #define FC_MEM_NUM 30
101
102 typedef enum _FcValueBinding {
103 FcValueBindingWeak, FcValueBindingStrong, FcValueBindingSame
104 } FcValueBinding;
105
106 typedef struct _FcValueListPtr {
107 int bank;
108 union {
109 int stat;
110 struct _FcValueList *dyn;
111 } u;
112 } FcValueListPtr;
113
114 typedef struct _FcValueList {
115 FcValueListPtr next;
116
117 FcValue value;
118 FcValueBinding binding;
119 } FcValueList;
120
121 typedef int FcObjectPtr;
122
123 typedef struct _FcPatternEltPtr {
124 int bank;
125 union {
126 int stat;
127 struct _FcPatternElt *dyn;
128 } u;
129 } FcPatternEltPtr;
130
131 typedef struct _FcPatternElt {
132 FcObjectPtr object;
133 FcValueListPtr values;
134 } FcPatternElt;
135
136 struct _FcPattern {
137 int num;
138 int size;
139 FcPatternEltPtr elts;
140 int ref;
141 int bank;
142 };
143
144 typedef enum _FcOp {
145 FcOpInteger, FcOpDouble, FcOpString, FcOpMatrix, FcOpBool, FcOpCharSet,
146 FcOpNil,
147 FcOpField, FcOpConst,
148 FcOpAssign, FcOpAssignReplace,
149 FcOpPrependFirst, FcOpPrepend, FcOpAppend, FcOpAppendLast,
150 FcOpQuest,
151 FcOpOr, FcOpAnd, FcOpEqual, FcOpNotEqual,
152 FcOpContains, FcOpListing, FcOpNotContains,
153 FcOpLess, FcOpLessEqual, FcOpMore, FcOpMoreEqual,
154 FcOpPlus, FcOpMinus, FcOpTimes, FcOpDivide,
155 FcOpNot, FcOpComma, FcOpFloor, FcOpCeil, FcOpRound, FcOpTrunc,
156 FcOpInvalid
157 } FcOp;
158
159 typedef struct _FcExpr {
160 FcOp op;
161 union {
162 int ival;
163 double dval;
164 FcChar8 *sval;
165 FcMatrix *mval;
166 FcBool bval;
167 FcCharSet *cval;
168 char *field;
169 FcChar8 *constant;
170 struct {
171 struct _FcExpr *left, *right;
172 } tree;
173 } u;
174 } FcExpr;
175
176 typedef enum _FcQual {
177 FcQualAny, FcQualAll, FcQualFirst, FcQualNotFirst
178 } FcQual;
179
180 #define FcMatchDefault ((FcMatchKind) -1)
181
182 typedef struct _FcTest {
183 struct _FcTest *next;
184 FcMatchKind kind;
185 FcQual qual;
186 const char *field;
187 FcOp op;
188 FcExpr *expr;
189 } FcTest;
190
191 typedef struct _FcEdit {
192 struct _FcEdit *next;
193 const char *field;
194 FcOp op;
195 FcExpr *expr;
196 FcValueBinding binding;
197 } FcEdit;
198
199 typedef struct _FcSubst {
200 struct _FcSubst *next;
201 FcTest *test;
202 FcEdit *edit;
203 } FcSubst;
204
205 typedef struct _FcCharLeaf {
206 FcChar32 map[256/32];
207 } FcCharLeaf;
208
209 #define FC_REF_CONSTANT -1
210
211 struct _FcCharSet {
212 int ref; /* reference count */
213 int num; /* size of leaves and numbers arrays */
214 int bank;
215 union {
216 struct {
217 FcCharLeaf **leaves;
218 FcChar16 *numbers;
219 } dyn;
220 struct {
221 int leafidx_offset;
222 int numbers_offset;
223 } stat;
224 } u;
225 };
226
227 struct _FcStrSet {
228 int ref; /* reference count */
229 int num;
230 int size;
231 FcChar8 **strs;
232 };
233
234 struct _FcStrList {
235 FcStrSet *set;
236 int n;
237 };
238
239 typedef struct _FcStrBuf {
240 FcChar8 *buf;
241 FcBool allocated;
242 FcBool failed;
243 int len;
244 int size;
245 } FcStrBuf;
246
247 typedef struct _FcCache {
248 int magic; /* 0xFC02FC02 */
249 int count; /* number of bytes of data in block */
250 int bank; /* bank ID */
251 int pattern_count; /* number of FcPatterns */
252 int patternelt_count; /* number of FcPatternElts */
253 int valuelist_count; /* number of FcValueLists */
254 int str_count; /* size of strings appearing as FcValues */
255 int langset_count; /* number of FcLangSets */
256 int charset_count; /* number of FcCharSets */
257 int charset_numbers_count;
258 int charset_leaf_count;
259 int charset_leaf_idx_count;
260 } FcCache;
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 #define FC_STORAGE_STATIC 0x80
306 #define fc_value_string(v) (((v)->type & FC_STORAGE_STATIC) ? ((FcChar8 *) v) + (v)->u.s_off : (v) -> u.s)
307 #define fc_value_charset(v) (((v)->type & FC_STORAGE_STATIC) ? (const FcCharSet *)(((char *) v) + (v)->u.c_off) : (v) -> u.c)
308 #define fc_value_langset(v) (((v)->type & FC_STORAGE_STATIC) ? (const FcLangSet *)(((char *) v) + (v)->u.l_off) : (v) -> u.l)
309
310 /*
311 * The per-user ~/.fonts.cache-<version> file is loaded into
312 * this data structure. Each directory gets a substructure
313 * which is validated by comparing the directory timestamp with
314 * that saved in the cache. When valid, the entire directory cache
315 * can be immediately loaded without reading the directory. Otherwise,
316 * the files are checked individually; updated files are loaded into the
317 * cache which is then rewritten to the users home directory
318 */
319
320 #define FC_CACHE_MAGIC 0xFC02FC02
321
322 typedef struct _FcGlobalCacheDir FcGlobalCacheDir;
323
324 struct _FcGlobalCacheDir {
325 struct _FcGlobalCacheDir *next;
326 char *name;
327 FcCache metadata;
328 off_t offset;
329 void *ent;
330 };
331
332 typedef struct _FcGlobalCache {
333 FcGlobalCacheDir *dirs;
334 FcBool updated;
335 int fd;
336 } FcGlobalCache;
337
338 struct _FcAtomic {
339 FcChar8 *file; /* original file name */
340 FcChar8 *new; /* temp file name -- write data here */
341 FcChar8 *lck; /* lockfile name (used for locking) */
342 FcChar8 *tmp; /* tmpfile name (used for locking) */
343 };
344
345 struct _FcBlanks {
346 int nblank;
347 int sblank;
348 FcChar32 *blanks;
349 };
350
351 struct _FcConfig {
352 /*
353 * File names loaded from the configuration -- saved here as the
354 * cache file must be consulted before the directories are scanned,
355 * and those directives may occur in any order
356 */
357 FcStrSet *configDirs; /* directories to scan for fonts */
358 FcChar8 *cache; /* name of per-user cache file */
359 /*
360 * Set of allowed blank chars -- used to
361 * trim fonts of bogus glyphs
362 */
363 FcBlanks *blanks;
364 /*
365 * List of directories containing fonts,
366 * built by recursively scanning the set
367 * of configured directories
368 */
369 FcStrSet *fontDirs;
370 /*
371 * Names of all of the configuration files used
372 * to create this configuration
373 */
374 FcStrSet *configFiles; /* config files loaded */
375 /*
376 * Substitution instructions for patterns and fonts;
377 * maxObjects is used to allocate appropriate intermediate storage
378 * while performing a whole set of substitutions
379 */
380 FcSubst *substPattern; /* substitutions for patterns */
381 FcSubst *substFont; /* substitutions for fonts */
382 int maxObjects; /* maximum number of tests in all substs */
383 /*
384 * List of patterns used to control font file selection
385 */
386 FcStrSet *acceptGlobs;
387 FcStrSet *rejectGlobs;
388 FcFontSet *acceptPatterns;
389 FcFontSet *rejectPatterns;
390 /*
391 * The set of fonts loaded from the listed directories; the
392 * order within the set does not determine the font selection,
393 * except in the case of identical matches in which case earlier fonts
394 * match preferrentially
395 */
396 FcFontSet *fonts[FcSetApplication + 1];
397 /*
398 * Fontconfig can periodically rescan the system configuration
399 * and font directories. This rescanning occurs when font
400 * listing requests are made, but no more often than rescanInterval
401 * seconds apart.
402 */
403 time_t rescanTime; /* last time information was scanned */
404 int rescanInterval; /* interval between scans */
405 };
406
407 extern FcConfig *_fcConfig;
408
409 typedef struct _FcCharMap FcCharMap;
410
411 /* fcblanks.c */
412
413 /* fccache.c */
414
415 FcGlobalCache *
416 FcGlobalCacheCreate (void);
417
418 void
419 FcGlobalCacheDestroy (FcGlobalCache *cache);
420
421 FcBool
422 FcGlobalCacheReadDir (FcFontSet *set,
423 FcStrSet *dirs,
424 FcGlobalCache *cache,
425 const char *dir,
426 FcConfig *config);
427
428 void
429 FcGlobalCacheLoad (FcGlobalCache *cache,
430 FcStrSet *staleDirs,
431 const FcChar8 *cache_file);
432
433 FcBool
434 FcGlobalCacheUpdate (FcGlobalCache *cache,
435 const char *file,
436 FcFontSet *set);
437
438 FcBool
439 FcGlobalCacheSave (FcGlobalCache *cache,
440 const FcChar8 *cache_file);
441
442 FcFontSet *
443 FcCacheRead (FcConfig *config, FcGlobalCache * cache);
444
445 FcBool
446 FcDirCacheWrite (FcFontSet *set, FcStrSet * dirs, const FcChar8 *dir);
447
448 int
449 FcCacheBankToIndex (int bank);
450
451 /* fccfg.c */
452
453 FcBool
454 FcConfigAddConfigDir (FcConfig *config,
455 const FcChar8 *d);
456
457 FcBool
458 FcConfigAddFontDir (FcConfig *config,
459 const FcChar8 *d);
460
461 FcBool
462 FcConfigAddDir (FcConfig *config,
463 const FcChar8 *d);
464
465 FcBool
466 FcConfigAddConfigFile (FcConfig *config,
467 const FcChar8 *f);
468
469 FcBool
470 FcConfigSetCache (FcConfig *config,
471 const FcChar8 *c);
472
473 FcBool
474 FcConfigAddBlank (FcConfig *config,
475 FcChar32 blank);
476
477 FcBool
478 FcConfigAddEdit (FcConfig *config,
479 FcTest *test,
480 FcEdit *edit,
481 FcMatchKind kind);
482
483 void
484 FcConfigSetFonts (FcConfig *config,
485 FcFontSet *fonts,
486 FcSetName set);
487
488 FcBool
489 FcConfigCompareValue (const FcValue *m,
490 FcOp op,
491 const FcValue *v);
492
493 FcBool
494 FcConfigGlobAdd (FcConfig *config,
495 const FcChar8 *glob,
496 FcBool accept);
497
498 FcBool
499 FcConfigAcceptFilename (FcConfig *config,
500 const FcChar8 *filename);
501
502 FcBool
503 FcConfigPatternsAdd (FcConfig *config,
504 FcPattern *pattern,
505 FcBool accept);
506
507 FcBool
508 FcConfigAcceptFont (FcConfig *config,
509 const FcPattern *font);
510
511 /* fccharset.c */
512 FcCharSet *
513 FcCharSetFreeze (FcCharSet *cs);
514
515 void
516 FcCharSetThawAll (void);
517
518 FcBool
519 FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c);
520
521 FcCharSet *
522 FcNameParseCharSet (FcChar8 *string);
523
524 FcCharLeaf *
525 FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4);
526
527 void
528 FcCharSetNewBank (void);
529
530 int
531 FcCharSetNeededBytes (const FcCharSet *c);
532
533 void *
534 FcCharSetDistributeBytes (FcCache * metadata,
535 void * block_ptr);
536
537 FcCharSet *
538 FcCharSetSerialize(int bank, FcCharSet *c);
539
540 void *
541 FcCharSetUnserialize (FcCache metadata, void *block_ptr);
542
543 FcCharLeaf *
544 FcCharSetGetLeaf(const FcCharSet *c, int i);
545
546 FcChar16 *
547 FcCharSetGetNumbers(const FcCharSet *c);
548
549 /* fcdbg.c */
550 void
551 FcValueListPrint (const FcValueListPtr l);
552
553 void
554 FcLangSetPrint (const FcLangSet *ls);
555
556 void
557 FcOpPrint (FcOp op);
558
559 void
560 FcTestPrint (const FcTest *test);
561
562 void
563 FcExprPrint (const FcExpr *expr);
564
565 void
566 FcEditPrint (const FcEdit *edit);
567
568 void
569 FcSubstPrint (const FcSubst *subst);
570
571 int
572 FcDebug (void);
573
574 /* fcdir.c */
575
576 FcBool
577 FcFileIsDir (const FcChar8 *file);
578
579 FcBool
580 FcFileScanConfig (FcFontSet *set,
581 FcStrSet *dirs,
582 FcFileCache *cache,
583 FcBlanks *blanks,
584 const FcChar8 *file,
585 FcBool force,
586 FcConfig *config);
587
588 FcBool
589 FcDirScanConfig (FcFontSet *set,
590 FcStrSet *dirs,
591 FcFileCache *cache,
592 FcBlanks *blanks,
593 const FcChar8 *dir,
594 FcBool force,
595 FcConfig *config);
596
597 /* fcfont.c */
598 int
599 FcFontDebug (void);
600
601 /* fcfreetype.c */
602 FcBool
603 FcFreeTypeIsExclusiveLang (const FcChar8 *lang);
604
605 FcBool
606 FcFreeTypeHasLang (FcPattern *pattern, const FcChar8 *lang);
607
608 FcChar32
609 FcFreeTypeUcs4ToPrivate (FcChar32 ucs4, const FcCharMap *map);
610
611 FcChar32
612 FcFreeTypePrivateToUcs4 (FcChar32 private, const FcCharMap *map);
613
614 const FcCharMap *
615 FcFreeTypeGetPrivateMap (FT_Encoding encoding);
616
617 /* fcfs.c */
618
619 void
620 FcFontSetNewBank (void);
621
622 int
623 FcFontSetNeededBytes (FcFontSet *s);
624
625 void *
626 FcFontSetDistributeBytes (FcCache * metadata, void * block_ptr);
627
628 FcBool
629 FcFontSetSerialize (int bank, FcFontSet * s);
630
631 FcBool
632 FcFontSetUnserialize(FcCache metadata, FcFontSet * s, void * block_ptr);
633
634 /* fcgram.y */
635 int
636 FcConfigparse (void);
637
638 int
639 FcConfigwrap (void);
640
641 void
642 FcConfigerror (char *fmt, ...);
643
644 char *
645 FcConfigSaveField (const char *field);
646
647 void
648 FcTestDestroy (FcTest *test);
649
650 FcExpr *
651 FcExprCreateInteger (int i);
652
653 FcExpr *
654 FcExprCreateDouble (double d);
655
656 FcExpr *
657 FcExprCreateString (const FcChar8 *s);
658
659 FcExpr *
660 FcExprCreateMatrix (const FcMatrix *m);
661
662 FcExpr *
663 FcExprCreateBool (FcBool b);
664
665 FcExpr *
666 FcExprCreateNil (void);
667
668 FcExpr *
669 FcExprCreateField (const char *field);
670
671 FcExpr *
672 FcExprCreateConst (const FcChar8 *constant);
673
674 FcExpr *
675 FcExprCreateOp (FcExpr *left, FcOp op, FcExpr *right);
676
677 void
678 FcExprDestroy (FcExpr *e);
679
680 void
681 FcEditDestroy (FcEdit *e);
682
683 /* fcinit.c */
684
685 void
686 FcMemReport (void);
687
688 void
689 FcMemAlloc (int kind, int size);
690
691 void
692 FcMemFree (int kind, int size);
693
694 /* fclang.c */
695 FcLangSet *
696 FcFreeTypeLangSet (const FcCharSet *charset,
697 const FcChar8 *exclusiveLang);
698
699 FcLangResult
700 FcLangCompare (const FcChar8 *s1, const FcChar8 *s2);
701
702 const FcCharSet *
703 FcCharSetForLang (const FcChar8 *lang);
704
705 FcLangSet *
706 FcLangSetPromote (const FcChar8 *lang);
707
708 FcLangSet *
709 FcNameParseLangSet (const FcChar8 *string);
710
711 FcBool
712 FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls);
713
714 void
715 FcLangSetNewBank (void);
716
717 int
718 FcLangSetNeededBytes (const FcLangSet *l);
719
720 void *
721 FcLangSetDistributeBytes (FcCache * metadata,
722 void * block_ptr);
723
724 FcLangSet *
725 FcLangSetSerialize (int bank, FcLangSet *l);
726
727 void *
728 FcLangSetUnserialize (FcCache metadata, void *block_ptr);
729
730 /* fclist.c */
731
732 FcBool
733 FcListPatternMatchAny (const FcPattern *p,
734 const FcPattern *font);
735
736 /* fcmatch.c */
737
738 /* fcname.c */
739
740 FcBool
741 FcNameBool (const FcChar8 *v, FcBool *result);
742
743 void *
744 FcObjectDistributeBytes (FcCache * metadata,
745 void * block_ptr);
746
747 FcObjectPtr
748 FcObjectToPtr (const char * si);
749
750 int
751 FcObjectNeededBytes (void);
752
753 void *
754 FcObjectUnserialize (FcCache metadata, void *block_ptr);
755
756 void
757 FcObjectSerialize (void);
758
759 const char *
760 FcObjectPtrU (FcObjectPtr p);
761
762 int
763 FcObjectPtrCompare (FcObjectPtr a, FcObjectPtr b);
764
765 void
766 FcObjectStaticNameFini (void);
767
768 /* fcpat.c */
769
770 FcValue
771 FcValueCanonicalize (const FcValue *v);
772
773 void
774 FcValueListDestroy (FcValueListPtr l);
775
776 FcPatternElt *
777 FcPatternFindElt (const FcPattern *p, const char *object);
778
779 FcPatternElt *
780 FcPatternInsertElt (FcPattern *p, const char *object);
781
782 FcBool
783 FcPatternAddWithBinding (FcPattern *p,
784 const char *object,
785 FcValue value,
786 FcValueBinding binding,
787 FcBool append);
788
789 FcPattern *
790 FcPatternFreeze (FcPattern *p);
791
792 void
793 FcPatternFini (void);
794
795 FcBool
796 FcPatternAppend (FcPattern *p, FcPattern *s);
797
798 const FcChar8 *
799 FcStrStaticName (const FcChar8 *name);
800
801 FcChar32
802 FcStringHash (const FcChar8 *s);
803
804 void
805 FcPatternNewBank (void);
806
807 int
808 FcPatternNeededBytes (FcPattern *p);
809
810 void *
811 FcPatternDistributeBytes (FcCache * metadata, void * block_ptr);
812
813 FcValueList *
814 FcValueListPtrU(FcValueListPtr p);
815
816 FcPatternElt *
817 FcPatternEltU (FcPatternEltPtr pei);
818
819 FcValueListPtr
820 FcValueListPtrCreateDynamic(FcValueList * p);
821
822 FcPattern *
823 FcPatternSerialize (int bank, FcPattern * p);
824
825 void *
826 FcPatternUnserialize (FcCache metadata, void *block_ptr);
827
828 /* fcrender.c */
829
830 /* fcmatrix.c */
831
832 extern const FcMatrix FcIdentityMatrix;
833
834 void
835 FcMatrixFree (FcMatrix *mat);
836
837 /* fcstr.c */
838 void
839 FcStrSetSort (FcStrSet * set);
840
841 FcChar8 *
842 FcStrPlus (const FcChar8 *s1, const FcChar8 *s2);
843
844 void
845 FcStrFree (FcChar8 *s);
846
847 void
848 FcStrBufInit (FcStrBuf *buf, FcChar8 *init, int size);
849
850 void
851 FcStrBufDestroy (FcStrBuf *buf);
852
853 FcChar8 *
854 FcStrBufDone (FcStrBuf *buf);
855
856 FcBool
857 FcStrBufChar (FcStrBuf *buf, FcChar8 c);
858
859 FcBool
860 FcStrBufString (FcStrBuf *buf, const FcChar8 *s);
861
862 FcBool
863 FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len);
864
865 int
866 FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
867
868 const FcChar8 *
869 FcStrContainsIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2);
870
871 const FcChar8 *
872 FcStrContainsIgnoreCase (const FcChar8 *s1, const FcChar8 *s2);
873
874 FcBool
875 FcStrUsesHome (const FcChar8 *s);
876
877 FcChar8 *
878 FcStrLastSlash (const FcChar8 *path);
879
880 FcChar32
881 FcStrHashIgnoreCase (const FcChar8 *s);
882
883 #endif /* _FC_INT_H_ */