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