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