]>
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 | ||
24330d27 KP |
44 | typedef struct _FcSymbolic { |
45 | const char *name; | |
46 | int value; | |
47 | } FcSymbolic; | |
48 | ||
49 | #ifndef FC_CONFIG_PATH | |
50 | #define FC_CONFIG_PATH "fonts.conf" | |
51 | #endif | |
52 | ||
179c3995 KP |
53 | #define FC_FONT_FILE_INVALID ((FcChar8 *) ".") |
54 | #define FC_FONT_FILE_DIR ((FcChar8 *) ".dir") | |
55 | ||
daeed6e0 TL |
56 | #ifdef _WIN32 |
57 | #define FC_SEARCH_PATH_SEPARATOR ';' | |
58 | #else | |
59 | #define FC_SEARCH_PATH_SEPARATOR ':' | |
60 | #endif | |
61 | ||
24330d27 KP |
62 | #define FC_DBG_MATCH 1 |
63 | #define FC_DBG_MATCHV 2 | |
64 | #define FC_DBG_EDIT 4 | |
65 | #define FC_DBG_FONTSET 8 | |
66 | #define FC_DBG_CACHE 16 | |
67 | #define FC_DBG_CACHEV 32 | |
68 | #define FC_DBG_PARSE 64 | |
69 | #define FC_DBG_SCAN 128 | |
4c003605 | 70 | #define FC_DBG_SCANV 256 |
24330d27 | 71 | #define FC_DBG_MEMORY 512 |
2d9c79c0 | 72 | #define FC_DBG_CONFIG 1024 |
24330d27 KP |
73 | |
74 | #define FC_MEM_CHARSET 0 | |
d8d73958 | 75 | #define FC_MEM_CHARLEAF 1 |
24330d27 KP |
76 | #define FC_MEM_FONTSET 2 |
77 | #define FC_MEM_FONTPTR 3 | |
78 | #define FC_MEM_OBJECTSET 4 | |
79 | #define FC_MEM_OBJECTPTR 5 | |
80 | #define FC_MEM_MATRIX 6 | |
81 | #define FC_MEM_PATTERN 7 | |
82 | #define FC_MEM_PATELT 8 | |
83 | #define FC_MEM_VALLIST 9 | |
84 | #define FC_MEM_SUBSTATE 10 | |
85 | #define FC_MEM_STRING 11 | |
86 | #define FC_MEM_LISTBUCK 12 | |
d8d73958 KP |
87 | #define FC_MEM_STRSET 13 |
88 | #define FC_MEM_STRLIST 14 | |
89 | #define FC_MEM_CONFIG 15 | |
90 | #define FC_MEM_LANGSET 16 | |
9dac3c59 KP |
91 | #define FC_MEM_ATOMIC 17 |
92 | #define FC_MEM_BLANKS 18 | |
93 | #define FC_MEM_CACHE 19 | |
94 | #define FC_MEM_STRBUF 20 | |
95 | #define FC_MEM_SUBST 21 | |
96 | #define FC_MEM_OBJECTTYPE 22 | |
97 | #define FC_MEM_CONSTANT 23 | |
98 | #define FC_MEM_TEST 24 | |
99 | #define FC_MEM_EXPR 25 | |
100 | #define FC_MEM_VSTACK 26 | |
101 | #define FC_MEM_ATTR 27 | |
102 | #define FC_MEM_PSTACK 28 | |
d8d73958 | 103 | |
9dac3c59 | 104 | #define FC_MEM_NUM 29 |
24330d27 | 105 | |
4c003605 | 106 | typedef enum _FcValueBinding { |
dda7794f | 107 | FcValueBindingWeak, FcValueBindingStrong, FcValueBindingSame |
4c003605 KP |
108 | } FcValueBinding; |
109 | ||
24330d27 KP |
110 | typedef struct _FcValueList { |
111 | struct _FcValueList *next; | |
112 | FcValue value; | |
e709ddfa | 113 | FcValueBinding binding; |
24330d27 KP |
114 | } FcValueList; |
115 | ||
116 | typedef struct _FcPatternElt { | |
117 | const char *object; | |
6f6563ed | 118 | FcValueList *values; |
24330d27 KP |
119 | } FcPatternElt; |
120 | ||
d8d73958 | 121 | |
24330d27 KP |
122 | struct _FcPattern { |
123 | int num; | |
124 | int size; | |
6f6563ed | 125 | FcPatternElt *elts; |
e709ddfa | 126 | int ref; |
24330d27 KP |
127 | }; |
128 | ||
129 | typedef enum _FcOp { | |
130 | FcOpInteger, FcOpDouble, FcOpString, FcOpMatrix, FcOpBool, FcOpCharSet, | |
131 | FcOpNil, | |
132 | FcOpField, FcOpConst, | |
133 | FcOpAssign, FcOpAssignReplace, | |
134 | FcOpPrependFirst, FcOpPrepend, FcOpAppend, FcOpAppendLast, | |
135 | FcOpQuest, | |
74a623e0 KP |
136 | FcOpOr, FcOpAnd, FcOpEqual, FcOpNotEqual, |
137 | FcOpContains, FcOpListing, FcOpNotContains, | |
24330d27 KP |
138 | FcOpLess, FcOpLessEqual, FcOpMore, FcOpMoreEqual, |
139 | FcOpPlus, FcOpMinus, FcOpTimes, FcOpDivide, | |
3f7653c2 KP |
140 | FcOpNot, FcOpComma, FcOpFloor, FcOpCeil, FcOpRound, FcOpTrunc, |
141 | FcOpInvalid | |
24330d27 KP |
142 | } FcOp; |
143 | ||
144 | typedef struct _FcExpr { | |
145 | FcOp op; | |
146 | union { | |
147 | int ival; | |
148 | double dval; | |
ccb3e93b | 149 | FcChar8 *sval; |
24330d27 KP |
150 | FcMatrix *mval; |
151 | FcBool bval; | |
152 | FcCharSet *cval; | |
153 | char *field; | |
ccb3e93b | 154 | FcChar8 *constant; |
24330d27 KP |
155 | struct { |
156 | struct _FcExpr *left, *right; | |
157 | } tree; | |
158 | } u; | |
159 | } FcExpr; | |
160 | ||
161 | typedef enum _FcQual { | |
6f6563ed | 162 | FcQualAny, FcQualAll, FcQualFirst, FcQualNotFirst |
24330d27 KP |
163 | } FcQual; |
164 | ||
938bc633 KP |
165 | #define FcMatchDefault ((FcMatchKind) -1) |
166 | ||
24330d27 KP |
167 | typedef struct _FcTest { |
168 | struct _FcTest *next; | |
938bc633 | 169 | FcMatchKind kind; |
24330d27 KP |
170 | FcQual qual; |
171 | const char *field; | |
172 | FcOp op; | |
173 | FcExpr *expr; | |
174 | } FcTest; | |
175 | ||
176 | typedef struct _FcEdit { | |
177 | struct _FcEdit *next; | |
178 | const char *field; | |
179 | FcOp op; | |
180 | FcExpr *expr; | |
6fff2cda | 181 | FcValueBinding binding; |
24330d27 KP |
182 | } FcEdit; |
183 | ||
184 | typedef struct _FcSubst { | |
185 | struct _FcSubst *next; | |
186 | FcTest *test; | |
187 | FcEdit *edit; | |
188 | } FcSubst; | |
189 | ||
20ac65ab | 190 | typedef struct _FcCharLeaf { |
24330d27 | 191 | FcChar32 map[256/32]; |
20ac65ab | 192 | } FcCharLeaf; |
24330d27 | 193 | |
d8d73958 | 194 | #define FC_REF_CONSTANT -1 |
82f4243f | 195 | |
24330d27 | 196 | struct _FcCharSet { |
24330d27 | 197 | int ref; /* reference count */ |
20ac65ab KP |
198 | int num; /* size of leaves and numbers arrays */ |
199 | FcCharLeaf **leaves; | |
200 | FcChar16 *numbers; | |
24330d27 KP |
201 | }; |
202 | ||
179c3995 KP |
203 | struct _FcStrSet { |
204 | int ref; /* reference count */ | |
205 | int num; | |
206 | int size; | |
207 | FcChar8 **strs; | |
208 | }; | |
209 | ||
210 | struct _FcStrList { | |
211 | FcStrSet *set; | |
212 | int n; | |
213 | }; | |
214 | ||
c2e7c611 | 215 | typedef struct _FcStrBuf { |
24330d27 KP |
216 | FcChar8 *buf; |
217 | FcBool allocated; | |
218 | FcBool failed; | |
219 | int len; | |
220 | int size; | |
c2e7c611 | 221 | } FcStrBuf; |
24330d27 | 222 | |
7769c321 KP |
223 | /* |
224 | * To map adobe glyph names to unicode values, a precomputed hash | |
225 | * table is used | |
226 | */ | |
227 | ||
228 | typedef struct _FcGlyphName { | |
229 | FcChar32 ucs; /* unicode value */ | |
230 | FcChar8 name[1]; /* name extends beyond struct */ | |
231 | } FcGlyphName; | |
232 | ||
2d9c79c0 KP |
233 | #define FC_MAX_FILE_LEN 4096 |
234 | ||
327a7fd4 | 235 | /* |
f21f40f3 | 236 | * The per-user ~/.fonts.cache-<version> file is loaded into |
327a7fd4 KP |
237 | * this data structure. Each directory gets a substructure |
238 | * which is validated by comparing the directory timestamp with | |
239 | * that saved in the cache. When valid, the entire directory cache | |
240 | * can be immediately loaded without reading the directory. Otherwise, | |
241 | * the files are checked individually; updated files are loaded into the | |
242 | * cache which is then rewritten to the users home directory | |
243 | */ | |
244 | ||
245 | #define FC_GLOBAL_CACHE_DIR_HASH_SIZE 37 | |
246 | #define FC_GLOBAL_CACHE_FILE_HASH_SIZE 67 | |
247 | ||
248 | typedef struct _FcGlobalCacheInfo { | |
249 | unsigned int hash; | |
250 | FcChar8 *file; | |
251 | time_t time; | |
252 | FcBool referenced; | |
253 | } FcGlobalCacheInfo; | |
254 | ||
255 | typedef struct _FcGlobalCacheFile { | |
256 | struct _FcGlobalCacheFile *next; | |
257 | FcGlobalCacheInfo info; | |
258 | int id; | |
259 | FcChar8 *name; | |
260 | } FcGlobalCacheFile; | |
261 | ||
e712133c KP |
262 | typedef struct _FcGlobalCacheDir FcGlobalCacheDir; |
263 | ||
327a7fd4 KP |
264 | typedef struct _FcGlobalCacheSubdir { |
265 | struct _FcGlobalCacheSubdir *next; | |
e712133c | 266 | FcGlobalCacheDir *ent; |
327a7fd4 KP |
267 | } FcGlobalCacheSubdir; |
268 | ||
e712133c | 269 | struct _FcGlobalCacheDir { |
327a7fd4 KP |
270 | struct _FcGlobalCacheDir *next; |
271 | FcGlobalCacheInfo info; | |
272 | int len; | |
273 | FcGlobalCacheFile *ents[FC_GLOBAL_CACHE_FILE_HASH_SIZE]; | |
274 | FcGlobalCacheSubdir *subdirs; | |
e712133c | 275 | }; |
327a7fd4 KP |
276 | |
277 | typedef struct _FcGlobalCache { | |
278 | FcGlobalCacheDir *ents[FC_GLOBAL_CACHE_DIR_HASH_SIZE]; | |
279 | FcBool updated; | |
280 | FcBool broken; | |
281 | int entries; | |
282 | int referenced; | |
283 | } FcGlobalCache; | |
24330d27 | 284 | |
134f6011 KP |
285 | struct _FcAtomic { |
286 | FcChar8 *file; /* original file name */ | |
287 | FcChar8 *new; /* temp file name -- write data here */ | |
288 | FcChar8 *lck; /* lockfile name (used for locking) */ | |
289 | FcChar8 *tmp; /* tmpfile name (used for locking) */ | |
290 | }; | |
291 | ||
24330d27 KP |
292 | struct _FcBlanks { |
293 | int nblank; | |
294 | int sblank; | |
295 | FcChar32 *blanks; | |
296 | }; | |
297 | ||
298 | struct _FcConfig { | |
299 | /* | |
300 | * File names loaded from the configuration -- saved here as the | |
301 | * cache file must be consulted before the directories are scanned, | |
302 | * and those directives may occur in any order | |
303 | */ | |
179c3995 | 304 | FcStrSet *configDirs; /* directories to scan for fonts */ |
ccb3e93b | 305 | FcChar8 *cache; /* name of per-user cache file */ |
24330d27 KP |
306 | /* |
307 | * Set of allowed blank chars -- used to | |
308 | * trim fonts of bogus glyphs | |
309 | */ | |
310 | FcBlanks *blanks; | |
179c3995 KP |
311 | /* |
312 | * List of directories containing fonts, | |
313 | * built by recursively scanning the set | |
314 | * of configured directories | |
315 | */ | |
316 | FcStrSet *fontDirs; | |
24330d27 KP |
317 | /* |
318 | * Names of all of the configuration files used | |
319 | * to create this configuration | |
320 | */ | |
179c3995 | 321 | FcStrSet *configFiles; /* config files loaded */ |
24330d27 KP |
322 | /* |
323 | * Substitution instructions for patterns and fonts; | |
324 | * maxObjects is used to allocate appropriate intermediate storage | |
325 | * while performing a whole set of substitutions | |
326 | */ | |
327 | FcSubst *substPattern; /* substitutions for patterns */ | |
328 | FcSubst *substFont; /* substitutions for fonts */ | |
329 | int maxObjects; /* maximum number of tests in all substs */ | |
d47c9d6e KP |
330 | /* |
331 | * List of patterns used to control font file selection | |
332 | */ | |
333 | FcStrSet *acceptGlobs; | |
334 | FcStrSet *rejectGlobs; | |
4f27c1c0 KP |
335 | FcFontSet *acceptPatterns; |
336 | FcFontSet *rejectPatterns; | |
24330d27 KP |
337 | /* |
338 | * The set of fonts loaded from the listed directories; the | |
339 | * order within the set does not determine the font selection, | |
340 | * except in the case of identical matches in which case earlier fonts | |
341 | * match preferrentially | |
342 | */ | |
343 | FcFontSet *fonts[FcSetApplication + 1]; | |
179c3995 KP |
344 | /* |
345 | * Fontconfig can periodically rescan the system configuration | |
346 | * and font directories. This rescanning occurs when font | |
347 | * listing requests are made, but no more often than rescanInterval | |
348 | * seconds apart. | |
349 | */ | |
350 | time_t rescanTime; /* last time information was scanned */ | |
351 | int rescanInterval; /* interval between scans */ | |
24330d27 KP |
352 | }; |
353 | ||
6e9fc5de KP |
354 | extern FcConfig *_fcConfig; |
355 | ||
69937bd9 KP |
356 | typedef struct _FcCharMap FcCharMap; |
357 | ||
24330d27 KP |
358 | /* fcblanks.c */ |
359 | ||
360 | /* fccache.c */ | |
361 | ||
327a7fd4 KP |
362 | FcGlobalCache * |
363 | FcGlobalCacheCreate (void); | |
24330d27 | 364 | |
327a7fd4 KP |
365 | void |
366 | FcGlobalCacheDestroy (FcGlobalCache *cache); | |
367 | ||
368 | FcBool | |
a8386abc | 369 | FcGlobalCacheCheckTime (const FcChar8*file, FcGlobalCacheInfo *info); |
24330d27 KP |
370 | |
371 | void | |
327a7fd4 KP |
372 | FcGlobalCacheReferenced (FcGlobalCache *cache, |
373 | FcGlobalCacheInfo *info); | |
374 | ||
c4ab52dc KP |
375 | void |
376 | FcGlobalCacheReferenceSubdir (FcGlobalCache *cache, | |
377 | const FcChar8 *dir); | |
378 | ||
327a7fd4 KP |
379 | FcGlobalCacheDir * |
380 | FcGlobalCacheDirGet (FcGlobalCache *cache, | |
381 | const FcChar8 *dir, | |
382 | int len, | |
383 | FcBool create_missing); | |
24330d27 | 384 | |
179c3995 | 385 | FcBool |
327a7fd4 KP |
386 | FcGlobalCacheScanDir (FcFontSet *set, |
387 | FcStrSet *dirs, | |
388 | FcGlobalCache *cache, | |
d47c9d6e KP |
389 | const FcChar8 *dir, |
390 | FcConfig *config); | |
327a7fd4 KP |
391 | |
392 | FcGlobalCacheFile * | |
393 | FcGlobalCacheFileGet (FcGlobalCache *cache, | |
394 | const FcChar8 *file, | |
395 | int id, | |
396 | int *count); | |
397 | ||
179c3995 | 398 | |
24330d27 | 399 | void |
327a7fd4 KP |
400 | FcGlobalCacheLoad (FcGlobalCache *cache, |
401 | const FcChar8 *cache_file); | |
24330d27 KP |
402 | |
403 | FcBool | |
327a7fd4 KP |
404 | FcGlobalCacheUpdate (FcGlobalCache *cache, |
405 | const FcChar8 *file, | |
406 | int id, | |
407 | const FcChar8 *name); | |
24330d27 KP |
408 | |
409 | FcBool | |
327a7fd4 KP |
410 | FcGlobalCacheSave (FcGlobalCache *cache, |
411 | const FcChar8 *cache_file); | |
24330d27 | 412 | |
24330d27 | 413 | FcBool |
d47c9d6e KP |
414 | FcDirCacheReadDir (FcFontSet *set, |
415 | FcStrSet *dirs, | |
416 | const FcChar8 *dir, | |
417 | FcConfig *config); | |
327a7fd4 KP |
418 | |
419 | FcBool | |
420 | FcDirCacheWriteDir (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir); | |
24330d27 KP |
421 | |
422 | /* fccfg.c */ | |
423 | ||
179c3995 KP |
424 | FcBool |
425 | FcConfigAddConfigDir (FcConfig *config, | |
426 | const FcChar8 *d); | |
427 | ||
428 | FcBool | |
429 | FcConfigAddFontDir (FcConfig *config, | |
430 | const FcChar8 *d); | |
431 | ||
24330d27 | 432 | FcBool |
ccb3e93b KP |
433 | FcConfigAddDir (FcConfig *config, |
434 | const FcChar8 *d); | |
24330d27 KP |
435 | |
436 | FcBool | |
ccb3e93b KP |
437 | FcConfigAddConfigFile (FcConfig *config, |
438 | const FcChar8 *f); | |
24330d27 KP |
439 | |
440 | FcBool | |
441 | FcConfigSetCache (FcConfig *config, | |
ccb3e93b | 442 | const FcChar8 *c); |
24330d27 KP |
443 | |
444 | FcBool | |
445 | FcConfigAddBlank (FcConfig *config, | |
446 | FcChar32 blank); | |
447 | ||
448 | FcBool | |
449 | FcConfigAddEdit (FcConfig *config, | |
450 | FcTest *test, | |
451 | FcEdit *edit, | |
452 | FcMatchKind kind); | |
453 | ||
454 | void | |
455 | FcConfigSetFonts (FcConfig *config, | |
456 | FcFontSet *fonts, | |
457 | FcSetName set); | |
458 | ||
459 | FcBool | |
460 | FcConfigCompareValue (const FcValue m, | |
461 | FcOp op, | |
462 | const FcValue v); | |
463 | ||
d47c9d6e KP |
464 | FcBool |
465 | FcConfigGlobAdd (FcConfig *config, | |
466 | const FcChar8 *glob, | |
467 | FcBool accept); | |
468 | ||
469 | FcBool | |
470 | FcConfigAcceptFilename (FcConfig *config, | |
471 | const FcChar8 *filename); | |
472 | ||
4f27c1c0 KP |
473 | FcBool |
474 | FcConfigPatternsAdd (FcConfig *config, | |
475 | FcPattern *pattern, | |
476 | FcBool accept); | |
477 | ||
478 | FcBool | |
479 | FcConfigAcceptFont (FcConfig *config, | |
480 | const FcPattern *font); | |
481 | ||
24330d27 | 482 | /* fccharset.c */ |
4c003605 KP |
483 | FcCharSet * |
484 | FcCharSetFreeze (FcCharSet *cs); | |
485 | ||
34cd0514 CW |
486 | void |
487 | FcCharSetThawAll (void); | |
488 | ||
24330d27 | 489 | FcBool |
c2e7c611 | 490 | FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c); |
24330d27 KP |
491 | |
492 | FcCharSet * | |
493 | FcNameParseCharSet (FcChar8 *string); | |
494 | ||
c647f6f1 KP |
495 | FcCharLeaf * |
496 | FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4); | |
69937bd9 | 497 | |
24330d27 | 498 | /* fcdbg.c */ |
24330d27 | 499 | void |
938bc633 | 500 | FcValueListPrint (const FcValueList *l); |
24330d27 | 501 | |
793e946c KP |
502 | void |
503 | FcLangSetPrint (const FcLangSet *ls); | |
504 | ||
24330d27 KP |
505 | void |
506 | FcOpPrint (FcOp op); | |
507 | ||
508 | void | |
938bc633 | 509 | FcTestPrint (const FcTest *test); |
24330d27 KP |
510 | |
511 | void | |
938bc633 | 512 | FcExprPrint (const FcExpr *expr); |
24330d27 KP |
513 | |
514 | void | |
938bc633 | 515 | FcEditPrint (const FcEdit *edit); |
24330d27 KP |
516 | |
517 | void | |
938bc633 | 518 | FcSubstPrint (const FcSubst *subst); |
24330d27 | 519 | |
24330d27 KP |
520 | int |
521 | FcDebug (void); | |
522 | ||
523 | /* fcdir.c */ | |
24330d27 | 524 | |
2d9c79c0 KP |
525 | FcBool |
526 | FcFileIsDir (const FcChar8 *file); | |
527 | ||
d47c9d6e KP |
528 | FcBool |
529 | FcFileScanConfig (FcFontSet *set, | |
530 | FcStrSet *dirs, | |
531 | FcFileCache *cache, | |
532 | FcBlanks *blanks, | |
533 | const FcChar8 *file, | |
534 | FcBool force, | |
535 | FcConfig *config); | |
536 | ||
537 | FcBool | |
538 | FcDirScanConfig (FcFontSet *set, | |
539 | FcStrSet *dirs, | |
540 | FcFileCache *cache, | |
541 | FcBlanks *blanks, | |
542 | const FcChar8 *dir, | |
543 | FcBool force, | |
544 | FcConfig *config); | |
545 | ||
24330d27 KP |
546 | /* fcfont.c */ |
547 | int | |
548 | FcFontDebug (void); | |
549 | ||
82f4243f | 550 | /* fcfreetype.c */ |
e50b9ae7 KP |
551 | FcBool |
552 | FcFreeTypeIsExclusiveLang (const FcChar8 *lang); | |
553 | ||
82f4243f KP |
554 | FcBool |
555 | FcFreeTypeHasLang (FcPattern *pattern, const FcChar8 *lang); | |
556 | ||
c647f6f1 KP |
557 | FcChar32 |
558 | FcFreeTypeUcs4ToPrivate (FcChar32 ucs4, const FcCharMap *map); | |
559 | ||
560 | FcChar32 | |
561 | FcFreeTypePrivateToUcs4 (FcChar32 private, const FcCharMap *map); | |
562 | ||
563 | const FcCharMap * | |
564 | FcFreeTypeGetPrivateMap (FT_Encoding encoding); | |
565 | ||
24330d27 KP |
566 | /* fcfs.c */ |
567 | /* fcgram.y */ | |
568 | int | |
569 | FcConfigparse (void); | |
570 | ||
571 | int | |
572 | FcConfigwrap (void); | |
573 | ||
574 | void | |
575 | FcConfigerror (char *fmt, ...); | |
576 | ||
577 | char * | |
578 | FcConfigSaveField (const char *field); | |
579 | ||
580 | FcTest * | |
938bc633 KP |
581 | FcTestCreate (FcMatchKind kind, |
582 | FcQual qual, | |
583 | const FcChar8 *field, | |
584 | FcOp compare, | |
585 | FcExpr *expr); | |
24330d27 KP |
586 | |
587 | void | |
588 | FcTestDestroy (FcTest *test); | |
589 | ||
590 | FcExpr * | |
591 | FcExprCreateInteger (int i); | |
592 | ||
593 | FcExpr * | |
594 | FcExprCreateDouble (double d); | |
595 | ||
596 | FcExpr * | |
ccb3e93b | 597 | FcExprCreateString (const FcChar8 *s); |
24330d27 KP |
598 | |
599 | FcExpr * | |
600 | FcExprCreateMatrix (const FcMatrix *m); | |
601 | ||
602 | FcExpr * | |
603 | FcExprCreateBool (FcBool b); | |
604 | ||
605 | FcExpr * | |
606 | FcExprCreateNil (void); | |
607 | ||
608 | FcExpr * | |
609 | FcExprCreateField (const char *field); | |
610 | ||
611 | FcExpr * | |
ccb3e93b | 612 | FcExprCreateConst (const FcChar8 *constant); |
24330d27 KP |
613 | |
614 | FcExpr * | |
615 | FcExprCreateOp (FcExpr *left, FcOp op, FcExpr *right); | |
616 | ||
617 | void | |
618 | FcExprDestroy (FcExpr *e); | |
619 | ||
620 | FcEdit * | |
6fff2cda | 621 | FcEditCreate (const char *field, FcOp op, FcExpr *expr, FcValueBinding binding); |
24330d27 KP |
622 | |
623 | void | |
624 | FcEditDestroy (FcEdit *e); | |
625 | ||
626 | /* fcinit.c */ | |
627 | ||
628 | void | |
629 | FcMemReport (void); | |
630 | ||
631 | void | |
632 | FcMemAlloc (int kind, int size); | |
633 | ||
634 | void | |
635 | FcMemFree (int kind, int size); | |
636 | ||
82f4243f | 637 | /* fclang.c */ |
d8d73958 KP |
638 | FcLangSet * |
639 | FcFreeTypeLangSet (const FcCharSet *charset, | |
e50b9ae7 | 640 | const FcChar8 *exclusiveLang); |
82f4243f KP |
641 | |
642 | FcLangResult | |
643 | FcLangCompare (const FcChar8 *s1, const FcChar8 *s2); | |
644 | ||
645 | const FcCharSet * | |
646 | FcCharSetForLang (const FcChar8 *lang); | |
647 | ||
d8d73958 KP |
648 | FcLangSet * |
649 | FcLangSetPromote (const FcChar8 *lang); | |
650 | ||
651 | FcLangSet * | |
652 | FcNameParseLangSet (const FcChar8 *string); | |
653 | ||
654 | FcBool | |
655 | FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls); | |
656 | ||
24330d27 KP |
657 | /* fclist.c */ |
658 | ||
4f27c1c0 KP |
659 | FcBool |
660 | FcListPatternMatchAny (const FcPattern *p, | |
661 | const FcPattern *font); | |
662 | ||
24330d27 KP |
663 | /* fcmatch.c */ |
664 | ||
665 | /* fcname.c */ | |
24330d27 KP |
666 | |
667 | FcBool | |
ccb3e93b | 668 | FcNameBool (FcChar8 *v, FcBool *result); |
24330d27 | 669 | |
24330d27 KP |
670 | /* fcpat.c */ |
671 | void | |
672 | FcValueListDestroy (FcValueList *l); | |
673 | ||
674 | FcPatternElt * | |
e9be9cd1 KP |
675 | FcPatternFindElt (const FcPattern *p, const char *object); |
676 | ||
677 | FcPatternElt * | |
678 | FcPatternInsertElt (FcPattern *p, const char *object); | |
24330d27 | 679 | |
82f4243f KP |
680 | FcBool |
681 | FcPatternAddWithBinding (FcPattern *p, | |
682 | const char *object, | |
683 | FcValue value, | |
684 | FcValueBinding binding, | |
685 | FcBool append); | |
686 | ||
d8d73958 KP |
687 | FcPattern * |
688 | FcPatternFreeze (FcPattern *p); | |
689 | ||
34cd0514 CW |
690 | void |
691 | FcPatternThawAll (void); | |
692 | ||
4f27c1c0 KP |
693 | FcBool |
694 | FcPatternAppend (FcPattern *p, FcPattern *s); | |
695 | ||
696 | const char * | |
697 | FcObjectStaticName (const char *name); | |
698 | ||
24330d27 KP |
699 | /* fcrender.c */ |
700 | ||
701 | /* fcmatrix.c */ | |
327a7fd4 KP |
702 | |
703 | extern const FcMatrix FcIdentityMatrix; | |
704 | ||
24330d27 KP |
705 | void |
706 | FcMatrixFree (FcMatrix *mat); | |
707 | ||
708 | /* fcstr.c */ | |
ccb3e93b KP |
709 | FcChar8 * |
710 | FcStrPlus (const FcChar8 *s1, const FcChar8 *s2); | |
24330d27 KP |
711 | |
712 | void | |
ccb3e93b | 713 | FcStrFree (FcChar8 *s); |
24330d27 | 714 | |
c2e7c611 KP |
715 | void |
716 | FcStrBufInit (FcStrBuf *buf, FcChar8 *init, int size); | |
717 | ||
718 | void | |
719 | FcStrBufDestroy (FcStrBuf *buf); | |
720 | ||
721 | FcChar8 * | |
722 | FcStrBufDone (FcStrBuf *buf); | |
723 | ||
724 | FcBool | |
725 | FcStrBufChar (FcStrBuf *buf, FcChar8 c); | |
726 | ||
727 | FcBool | |
728 | FcStrBufString (FcStrBuf *buf, const FcChar8 *s); | |
729 | ||
730 | FcBool | |
731 | FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len); | |
732 | ||
82f4243f KP |
733 | int |
734 | FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2); | |
735 | ||
11fec41c KP |
736 | const FcChar8 * |
737 | FcStrContainsIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2); | |
738 | ||
739 | const FcChar8 * | |
740 | FcStrContainsIgnoreCase (const FcChar8 *s1, const FcChar8 *s2); | |
741 | ||
ff3f1f98 KP |
742 | FcBool |
743 | FcStrUsesHome (const FcChar8 *s); | |
744 | ||
daeed6e0 TL |
745 | FcChar8 * |
746 | FcStrLastSlash (const FcChar8 *path); | |
747 | ||
24330d27 | 748 | #endif /* _FC_INT_H_ */ |