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