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