]>
Commit | Line | Data |
---|---|---|
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 |
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 | ||
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 | 108 | typedef enum _FcValueBinding { |
dda7794f | 109 | FcValueBindingWeak, FcValueBindingStrong, FcValueBindingSame |
4c003605 KP |
110 | } FcValueBinding; |
111 | ||
cd2ec1a9 PL |
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 | ||
24330d27 | 128 | typedef struct _FcValueList { |
cd2ec1a9 PL |
129 | FcValueListPtr next; |
130 | ||
24330d27 | 131 | FcValue value; |
e709ddfa | 132 | FcValueBinding binding; |
24330d27 KP |
133 | } FcValueList; |
134 | ||
cd2ec1a9 PL |
135 | typedef struct _FcPatternEltPtr { |
136 | FcStorage storage; | |
137 | union { | |
138 | int stat; | |
139 | struct _FcPatternElt *dyn; | |
140 | } u; | |
141 | } FcPatternEltPtr; | |
142 | ||
24330d27 | 143 | typedef struct _FcPatternElt { |
cd2ec1a9 PL |
144 | FcObjectPtr object; |
145 | FcValueListPtr values; | |
24330d27 KP |
146 | } FcPatternElt; |
147 | ||
148 | struct _FcPattern { | |
149 | int num; | |
150 | int size; | |
cd2ec1a9 | 151 | FcPatternEltPtr elts; |
e709ddfa | 152 | int ref; |
24330d27 KP |
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, | |
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 | ||
170 | typedef 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 | ||
187 | typedef enum _FcQual { | |
6f6563ed | 188 | FcQualAny, FcQualAll, FcQualFirst, FcQualNotFirst |
24330d27 KP |
189 | } FcQual; |
190 | ||
938bc633 KP |
191 | #define FcMatchDefault ((FcMatchKind) -1) |
192 | ||
24330d27 KP |
193 | typedef 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 | ||
202 | typedef 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 | ||
210 | typedef struct _FcSubst { | |
211 | struct _FcSubst *next; | |
212 | FcTest *test; | |
213 | FcEdit *edit; | |
214 | } FcSubst; | |
215 | ||
20ac65ab | 216 | typedef struct _FcCharLeaf { |
24330d27 | 217 | FcChar32 map[256/32]; |
20ac65ab | 218 | } FcCharLeaf; |
24330d27 | 219 | |
d8d73958 | 220 | #define FC_REF_CONSTANT -1 |
82f4243f | 221 | |
24330d27 | 222 | struct _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 |
238 | struct _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 | ||
249 | struct _FcStrList { | |
250 | FcStrSet *set; | |
251 | int n; | |
252 | }; | |
253 | ||
c2e7c611 | 254 | typedef struct _FcStrBuf { |
24330d27 KP |
255 | FcChar8 *buf; |
256 | FcBool allocated; | |
257 | FcBool failed; | |
258 | int len; | |
259 | int size; | |
c2e7c611 | 260 | } FcStrBuf; |
24330d27 | 261 | |
7769c321 KP |
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 | ||
192296d8 KP |
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 | ||
2d9c79c0 KP |
303 | #define FC_MAX_FILE_LEN 4096 |
304 | ||
327a7fd4 | 305 | /* |
f21f40f3 | 306 | * The per-user ~/.fonts.cache-<version> file is loaded into |
327a7fd4 KP |
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 | ||
e712133c KP |
332 | typedef struct _FcGlobalCacheDir FcGlobalCacheDir; |
333 | ||
327a7fd4 KP |
334 | typedef struct _FcGlobalCacheSubdir { |
335 | struct _FcGlobalCacheSubdir *next; | |
e712133c | 336 | FcGlobalCacheDir *ent; |
327a7fd4 KP |
337 | } FcGlobalCacheSubdir; |
338 | ||
e712133c | 339 | struct _FcGlobalCacheDir { |
327a7fd4 KP |
340 | struct _FcGlobalCacheDir *next; |
341 | FcGlobalCacheInfo info; | |
342 | int len; | |
343 | FcGlobalCacheFile *ents[FC_GLOBAL_CACHE_FILE_HASH_SIZE]; | |
344 | FcGlobalCacheSubdir *subdirs; | |
e712133c | 345 | }; |
327a7fd4 KP |
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; | |
24330d27 | 354 | |
134f6011 KP |
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 | ||
24330d27 KP |
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 | */ | |
179c3995 | 374 | FcStrSet *configDirs; /* directories to scan for fonts */ |
ccb3e93b | 375 | FcChar8 *cache; /* name of per-user cache file */ |
24330d27 KP |
376 | /* |
377 | * Set of allowed blank chars -- used to | |
378 | * trim fonts of bogus glyphs | |
379 | */ | |
380 | FcBlanks *blanks; | |
179c3995 KP |
381 | /* |
382 | * List of directories containing fonts, | |
383 | * built by recursively scanning the set | |
384 | * of configured directories | |
385 | */ | |
386 | FcStrSet *fontDirs; | |
24330d27 KP |
387 | /* |
388 | * Names of all of the configuration files used | |
389 | * to create this configuration | |
390 | */ | |
179c3995 | 391 | FcStrSet *configFiles; /* config files loaded */ |
24330d27 KP |
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 */ | |
d47c9d6e KP |
400 | /* |
401 | * List of patterns used to control font file selection | |
402 | */ | |
403 | FcStrSet *acceptGlobs; | |
404 | FcStrSet *rejectGlobs; | |
4f27c1c0 KP |
405 | FcFontSet *acceptPatterns; |
406 | FcFontSet *rejectPatterns; | |
24330d27 KP |
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]; | |
179c3995 KP |
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 */ | |
24330d27 KP |
422 | }; |
423 | ||
6e9fc5de KP |
424 | extern FcConfig *_fcConfig; |
425 | ||
69937bd9 KP |
426 | typedef struct _FcCharMap FcCharMap; |
427 | ||
24330d27 KP |
428 | /* fcblanks.c */ |
429 | ||
430 | /* fccache.c */ | |
431 | ||
327a7fd4 KP |
432 | FcGlobalCache * |
433 | FcGlobalCacheCreate (void); | |
24330d27 | 434 | |
327a7fd4 KP |
435 | void |
436 | FcGlobalCacheDestroy (FcGlobalCache *cache); | |
437 | ||
438 | FcBool | |
a8386abc | 439 | FcGlobalCacheCheckTime (const FcChar8*file, FcGlobalCacheInfo *info); |
24330d27 KP |
440 | |
441 | void | |
327a7fd4 KP |
442 | FcGlobalCacheReferenced (FcGlobalCache *cache, |
443 | FcGlobalCacheInfo *info); | |
444 | ||
c4ab52dc KP |
445 | void |
446 | FcGlobalCacheReferenceSubdir (FcGlobalCache *cache, | |
447 | const FcChar8 *dir); | |
448 | ||
327a7fd4 KP |
449 | FcGlobalCacheDir * |
450 | FcGlobalCacheDirGet (FcGlobalCache *cache, | |
451 | const FcChar8 *dir, | |
452 | int len, | |
453 | FcBool create_missing); | |
24330d27 | 454 | |
179c3995 | 455 | FcBool |
327a7fd4 KP |
456 | FcGlobalCacheScanDir (FcFontSet *set, |
457 | FcStrSet *dirs, | |
458 | FcGlobalCache *cache, | |
d47c9d6e KP |
459 | const FcChar8 *dir, |
460 | FcConfig *config); | |
327a7fd4 KP |
461 | |
462 | FcGlobalCacheFile * | |
463 | FcGlobalCacheFileGet (FcGlobalCache *cache, | |
464 | const FcChar8 *file, | |
465 | int id, | |
466 | int *count); | |
467 | ||
179c3995 | 468 | |
24330d27 | 469 | void |
327a7fd4 KP |
470 | FcGlobalCacheLoad (FcGlobalCache *cache, |
471 | const FcChar8 *cache_file); | |
24330d27 KP |
472 | |
473 | FcBool | |
327a7fd4 KP |
474 | FcGlobalCacheUpdate (FcGlobalCache *cache, |
475 | const FcChar8 *file, | |
476 | int id, | |
477 | const FcChar8 *name); | |
24330d27 KP |
478 | |
479 | FcBool | |
327a7fd4 KP |
480 | FcGlobalCacheSave (FcGlobalCache *cache, |
481 | const FcChar8 *cache_file); | |
24330d27 | 482 | |
24330d27 | 483 | FcBool |
d47c9d6e KP |
484 | FcDirCacheReadDir (FcFontSet *set, |
485 | FcStrSet *dirs, | |
486 | const FcChar8 *dir, | |
487 | FcConfig *config); | |
327a7fd4 KP |
488 | |
489 | FcBool | |
490 | FcDirCacheWriteDir (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir); | |
24330d27 KP |
491 | |
492 | /* fccfg.c */ | |
493 | ||
179c3995 KP |
494 | FcBool |
495 | FcConfigAddConfigDir (FcConfig *config, | |
496 | const FcChar8 *d); | |
497 | ||
498 | FcBool | |
499 | FcConfigAddFontDir (FcConfig *config, | |
500 | const FcChar8 *d); | |
501 | ||
24330d27 | 502 | FcBool |
ccb3e93b KP |
503 | FcConfigAddDir (FcConfig *config, |
504 | const FcChar8 *d); | |
24330d27 KP |
505 | |
506 | FcBool | |
ccb3e93b KP |
507 | FcConfigAddConfigFile (FcConfig *config, |
508 | const FcChar8 *f); | |
24330d27 KP |
509 | |
510 | FcBool | |
511 | FcConfigSetCache (FcConfig *config, | |
ccb3e93b | 512 | const FcChar8 *c); |
24330d27 KP |
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 | ||
d47c9d6e KP |
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 | ||
4f27c1c0 KP |
543 | FcBool |
544 | FcConfigPatternsAdd (FcConfig *config, | |
545 | FcPattern *pattern, | |
546 | FcBool accept); | |
547 | ||
548 | FcBool | |
549 | FcConfigAcceptFont (FcConfig *config, | |
550 | const FcPattern *font); | |
551 | ||
24330d27 | 552 | /* fccharset.c */ |
4c003605 KP |
553 | FcCharSet * |
554 | FcCharSetFreeze (FcCharSet *cs); | |
555 | ||
34cd0514 CW |
556 | void |
557 | FcCharSetThawAll (void); | |
558 | ||
24330d27 | 559 | FcBool |
c2e7c611 | 560 | FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c); |
24330d27 KP |
561 | |
562 | FcCharSet * | |
563 | FcNameParseCharSet (FcChar8 *string); | |
564 | ||
c647f6f1 KP |
565 | FcCharLeaf * |
566 | FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4); | |
69937bd9 | 567 | |
cd2ec1a9 PL |
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 | ||
24330d27 | 589 | /* fcdbg.c */ |
24330d27 | 590 | void |
cd2ec1a9 | 591 | FcValueListPrint (const FcValueListPtr l); |
24330d27 | 592 | |
793e946c KP |
593 | void |
594 | FcLangSetPrint (const FcLangSet *ls); | |
595 | ||
24330d27 KP |
596 | void |
597 | FcOpPrint (FcOp op); | |
598 | ||
599 | void | |
938bc633 | 600 | FcTestPrint (const FcTest *test); |
24330d27 KP |
601 | |
602 | void | |
938bc633 | 603 | FcExprPrint (const FcExpr *expr); |
24330d27 KP |
604 | |
605 | void | |
938bc633 | 606 | FcEditPrint (const FcEdit *edit); |
24330d27 KP |
607 | |
608 | void | |
938bc633 | 609 | FcSubstPrint (const FcSubst *subst); |
24330d27 | 610 | |
24330d27 KP |
611 | int |
612 | FcDebug (void); | |
613 | ||
cd2ec1a9 PL |
614 | FcCharSet * |
615 | FcCharSetPtrU (FcCharSetPtr mi); | |
616 | ||
24330d27 | 617 | /* fcdir.c */ |
24330d27 | 618 | |
2d9c79c0 KP |
619 | FcBool |
620 | FcFileIsDir (const FcChar8 *file); | |
621 | ||
d47c9d6e KP |
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 | ||
24330d27 KP |
640 | /* fcfont.c */ |
641 | int | |
642 | FcFontDebug (void); | |
643 | ||
82f4243f | 644 | /* fcfreetype.c */ |
e50b9ae7 KP |
645 | FcBool |
646 | FcFreeTypeIsExclusiveLang (const FcChar8 *lang); | |
647 | ||
82f4243f KP |
648 | FcBool |
649 | FcFreeTypeHasLang (FcPattern *pattern, const FcChar8 *lang); | |
650 | ||
c647f6f1 KP |
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 | ||
24330d27 | 660 | /* fcfs.c */ |
cd2ec1a9 PL |
661 | |
662 | void | |
663 | FcFontSetClearStatic (void); | |
664 | ||
665 | FcBool | |
666 | FcFontSetPrepareSerialize (FcFontSet * s); | |
667 | ||
668 | FcBool | |
669 | FcFontSetSerialize (FcFontSet * s); | |
670 | ||
24330d27 KP |
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 | ||
24330d27 KP |
684 | void |
685 | FcTestDestroy (FcTest *test); | |
686 | ||
687 | FcExpr * | |
688 | FcExprCreateInteger (int i); | |
689 | ||
690 | FcExpr * | |
691 | FcExprCreateDouble (double d); | |
692 | ||
693 | FcExpr * | |
ccb3e93b | 694 | FcExprCreateString (const FcChar8 *s); |
24330d27 KP |
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 * | |
ccb3e93b | 709 | FcExprCreateConst (const FcChar8 *constant); |
24330d27 KP |
710 | |
711 | FcExpr * | |
712 | FcExprCreateOp (FcExpr *left, FcOp op, FcExpr *right); | |
713 | ||
714 | void | |
715 | FcExprDestroy (FcExpr *e); | |
716 | ||
24330d27 KP |
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 | ||
82f4243f | 731 | /* fclang.c */ |
d8d73958 KP |
732 | FcLangSet * |
733 | FcFreeTypeLangSet (const FcCharSet *charset, | |
e50b9ae7 | 734 | const FcChar8 *exclusiveLang); |
82f4243f KP |
735 | |
736 | FcLangResult | |
737 | FcLangCompare (const FcChar8 *s1, const FcChar8 *s2); | |
738 | ||
739 | const FcCharSet * | |
740 | FcCharSetForLang (const FcChar8 *lang); | |
741 | ||
d8d73958 KP |
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 | ||
cd2ec1a9 PL |
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 | ||
24330d27 KP |
769 | /* fclist.c */ |
770 | ||
4f27c1c0 KP |
771 | FcBool |
772 | FcListPatternMatchAny (const FcPattern *p, | |
773 | const FcPattern *font); | |
774 | ||
24330d27 KP |
775 | /* fcmatch.c */ |
776 | ||
cd2ec1a9 PL |
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 | ||
24330d27 | 789 | /* fcname.c */ |
24330d27 KP |
790 | |
791 | FcBool | |
ca60d2b5 | 792 | FcNameBool (const FcChar8 *v, FcBool *result); |
24330d27 | 793 | |
24330d27 KP |
794 | /* fcpat.c */ |
795 | void | |
cd2ec1a9 PL |
796 | FcValueListDestroy (FcValueListPtr l); |
797 | ||
24330d27 | 798 | FcPatternElt * |
e9be9cd1 KP |
799 | FcPatternFindElt (const FcPattern *p, const char *object); |
800 | ||
801 | FcPatternElt * | |
802 | FcPatternInsertElt (FcPattern *p, const char *object); | |
24330d27 | 803 | |
82f4243f KP |
804 | FcBool |
805 | FcPatternAddWithBinding (FcPattern *p, | |
806 | const char *object, | |
807 | FcValue value, | |
808 | FcValueBinding binding, | |
809 | FcBool append); | |
810 | ||
d8d73958 KP |
811 | FcPattern * |
812 | FcPatternFreeze (FcPattern *p); | |
813 | ||
34cd0514 | 814 | void |
e1b9d091 | 815 | FcPatternFini (void); |
34cd0514 | 816 | |
4f27c1c0 KP |
817 | FcBool |
818 | FcPatternAppend (FcPattern *p, FcPattern *s); | |
819 | ||
cd2ec1a9 PL |
820 | void |
821 | FcObjectClearStatic(void); | |
822 | ||
823 | FcObjectPtr | |
4f27c1c0 KP |
824 | FcObjectStaticName (const char *name); |
825 | ||
cd2ec1a9 PL |
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 | ||
24330d27 KP |
868 | /* fcrender.c */ |
869 | ||
870 | /* fcmatrix.c */ | |
327a7fd4 | 871 | |
cd2ec1a9 | 872 | extern const FcMatrixPtr FcIdentityMatrix; |
327a7fd4 | 873 | |
24330d27 KP |
874 | void |
875 | FcMatrixFree (FcMatrix *mat); | |
876 | ||
cd2ec1a9 PL |
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 | ||
24330d27 | 895 | /* fcstr.c */ |
cd2ec1a9 PL |
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 | ||
ccb3e93b KP |
914 | FcChar8 * |
915 | FcStrPlus (const FcChar8 *s1, const FcChar8 *s2); | |
24330d27 KP |
916 | |
917 | void | |
ccb3e93b | 918 | FcStrFree (FcChar8 *s); |
24330d27 | 919 | |
c2e7c611 KP |
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 | ||
cd2ec1a9 PL |
938 | FcStrSetPtr |
939 | FcStrSetSerialize (FcStrSet *set); | |
940 | ||
82f4243f KP |
941 | int |
942 | FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2); | |
943 | ||
11fec41c KP |
944 | const FcChar8 * |
945 | FcStrContainsIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2); | |
946 | ||
947 | const FcChar8 * | |
948 | FcStrContainsIgnoreCase (const FcChar8 *s1, const FcChar8 *s2); | |
949 | ||
ff3f1f98 KP |
950 | FcBool |
951 | FcStrUsesHome (const FcChar8 *s); | |
952 | ||
daeed6e0 TL |
953 | FcChar8 * |
954 | FcStrLastSlash (const FcChar8 *path); | |
955 | ||
192296d8 KP |
956 | FcChar32 |
957 | FcStrHashIgnoreCase (const FcChar8 *s); | |
958 | ||
24330d27 | 959 | #endif /* _FC_INT_H_ */ |