]>
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 | ||
192296d8 KP |
234 | /* |
235 | * To perform case-insensitive string comparisons, a table | |
236 | * is used which holds three different kinds of folding data. | |
237 | * | |
238 | * The first is a range of upper case values mapping to a range | |
239 | * of their lower case equivalents. Within each range, the offset | |
240 | * between upper and lower case is constant. | |
241 | * | |
242 | * The second is a range of upper case values which are interleaved | |
243 | * with their lower case equivalents. | |
244 | * | |
245 | * The third is a set of raw unicode values mapping to a list | |
246 | * of unicode values for comparison purposes. This allows conversion | |
247 | * of ß to "ss" so that SS, ss and ß all match. A separate array | |
248 | * holds the list of unicode values for each entry. | |
249 | * | |
250 | * These are packed into a single table. Using a binary search, | |
251 | * the appropriate entry can be located. | |
252 | */ | |
253 | ||
254 | #define FC_CASE_FOLD_RANGE 0 | |
255 | #define FC_CASE_FOLD_EVEN_ODD 1 | |
256 | #define FC_CASE_FOLD_FULL 2 | |
257 | ||
258 | typedef struct _FcCaseFold { | |
259 | FcChar32 upper; | |
260 | FcChar16 method : 2; | |
261 | FcChar16 count : 14; | |
262 | short offset; /* lower - upper for RANGE, table id for FULL */ | |
263 | } FcCaseFold; | |
264 | ||
2d9c79c0 KP |
265 | #define FC_MAX_FILE_LEN 4096 |
266 | ||
327a7fd4 | 267 | /* |
f21f40f3 | 268 | * The per-user ~/.fonts.cache-<version> file is loaded into |
327a7fd4 KP |
269 | * this data structure. Each directory gets a substructure |
270 | * which is validated by comparing the directory timestamp with | |
271 | * that saved in the cache. When valid, the entire directory cache | |
272 | * can be immediately loaded without reading the directory. Otherwise, | |
273 | * the files are checked individually; updated files are loaded into the | |
274 | * cache which is then rewritten to the users home directory | |
275 | */ | |
276 | ||
277 | #define FC_GLOBAL_CACHE_DIR_HASH_SIZE 37 | |
278 | #define FC_GLOBAL_CACHE_FILE_HASH_SIZE 67 | |
279 | ||
280 | typedef struct _FcGlobalCacheInfo { | |
281 | unsigned int hash; | |
282 | FcChar8 *file; | |
283 | time_t time; | |
284 | FcBool referenced; | |
285 | } FcGlobalCacheInfo; | |
286 | ||
287 | typedef struct _FcGlobalCacheFile { | |
288 | struct _FcGlobalCacheFile *next; | |
289 | FcGlobalCacheInfo info; | |
290 | int id; | |
291 | FcChar8 *name; | |
292 | } FcGlobalCacheFile; | |
293 | ||
e712133c KP |
294 | typedef struct _FcGlobalCacheDir FcGlobalCacheDir; |
295 | ||
327a7fd4 KP |
296 | typedef struct _FcGlobalCacheSubdir { |
297 | struct _FcGlobalCacheSubdir *next; | |
e712133c | 298 | FcGlobalCacheDir *ent; |
327a7fd4 KP |
299 | } FcGlobalCacheSubdir; |
300 | ||
e712133c | 301 | struct _FcGlobalCacheDir { |
327a7fd4 KP |
302 | struct _FcGlobalCacheDir *next; |
303 | FcGlobalCacheInfo info; | |
304 | int len; | |
305 | FcGlobalCacheFile *ents[FC_GLOBAL_CACHE_FILE_HASH_SIZE]; | |
306 | FcGlobalCacheSubdir *subdirs; | |
e712133c | 307 | }; |
327a7fd4 KP |
308 | |
309 | typedef struct _FcGlobalCache { | |
310 | FcGlobalCacheDir *ents[FC_GLOBAL_CACHE_DIR_HASH_SIZE]; | |
311 | FcBool updated; | |
312 | FcBool broken; | |
313 | int entries; | |
314 | int referenced; | |
315 | } FcGlobalCache; | |
24330d27 | 316 | |
134f6011 KP |
317 | struct _FcAtomic { |
318 | FcChar8 *file; /* original file name */ | |
319 | FcChar8 *new; /* temp file name -- write data here */ | |
320 | FcChar8 *lck; /* lockfile name (used for locking) */ | |
321 | FcChar8 *tmp; /* tmpfile name (used for locking) */ | |
322 | }; | |
323 | ||
24330d27 KP |
324 | struct _FcBlanks { |
325 | int nblank; | |
326 | int sblank; | |
327 | FcChar32 *blanks; | |
328 | }; | |
329 | ||
330 | struct _FcConfig { | |
331 | /* | |
332 | * File names loaded from the configuration -- saved here as the | |
333 | * cache file must be consulted before the directories are scanned, | |
334 | * and those directives may occur in any order | |
335 | */ | |
179c3995 | 336 | FcStrSet *configDirs; /* directories to scan for fonts */ |
ccb3e93b | 337 | FcChar8 *cache; /* name of per-user cache file */ |
24330d27 KP |
338 | /* |
339 | * Set of allowed blank chars -- used to | |
340 | * trim fonts of bogus glyphs | |
341 | */ | |
342 | FcBlanks *blanks; | |
179c3995 KP |
343 | /* |
344 | * List of directories containing fonts, | |
345 | * built by recursively scanning the set | |
346 | * of configured directories | |
347 | */ | |
348 | FcStrSet *fontDirs; | |
24330d27 KP |
349 | /* |
350 | * Names of all of the configuration files used | |
351 | * to create this configuration | |
352 | */ | |
179c3995 | 353 | FcStrSet *configFiles; /* config files loaded */ |
24330d27 KP |
354 | /* |
355 | * Substitution instructions for patterns and fonts; | |
356 | * maxObjects is used to allocate appropriate intermediate storage | |
357 | * while performing a whole set of substitutions | |
358 | */ | |
359 | FcSubst *substPattern; /* substitutions for patterns */ | |
360 | FcSubst *substFont; /* substitutions for fonts */ | |
361 | int maxObjects; /* maximum number of tests in all substs */ | |
d47c9d6e KP |
362 | /* |
363 | * List of patterns used to control font file selection | |
364 | */ | |
365 | FcStrSet *acceptGlobs; | |
366 | FcStrSet *rejectGlobs; | |
4f27c1c0 KP |
367 | FcFontSet *acceptPatterns; |
368 | FcFontSet *rejectPatterns; | |
24330d27 KP |
369 | /* |
370 | * The set of fonts loaded from the listed directories; the | |
371 | * order within the set does not determine the font selection, | |
372 | * except in the case of identical matches in which case earlier fonts | |
373 | * match preferrentially | |
374 | */ | |
375 | FcFontSet *fonts[FcSetApplication + 1]; | |
179c3995 KP |
376 | /* |
377 | * Fontconfig can periodically rescan the system configuration | |
378 | * and font directories. This rescanning occurs when font | |
379 | * listing requests are made, but no more often than rescanInterval | |
380 | * seconds apart. | |
381 | */ | |
382 | time_t rescanTime; /* last time information was scanned */ | |
383 | int rescanInterval; /* interval between scans */ | |
24330d27 KP |
384 | }; |
385 | ||
6e9fc5de KP |
386 | extern FcConfig *_fcConfig; |
387 | ||
69937bd9 KP |
388 | typedef struct _FcCharMap FcCharMap; |
389 | ||
24330d27 KP |
390 | /* fcblanks.c */ |
391 | ||
392 | /* fccache.c */ | |
393 | ||
327a7fd4 KP |
394 | FcGlobalCache * |
395 | FcGlobalCacheCreate (void); | |
24330d27 | 396 | |
327a7fd4 KP |
397 | void |
398 | FcGlobalCacheDestroy (FcGlobalCache *cache); | |
399 | ||
400 | FcBool | |
a8386abc | 401 | FcGlobalCacheCheckTime (const FcChar8*file, FcGlobalCacheInfo *info); |
24330d27 KP |
402 | |
403 | void | |
327a7fd4 KP |
404 | FcGlobalCacheReferenced (FcGlobalCache *cache, |
405 | FcGlobalCacheInfo *info); | |
406 | ||
c4ab52dc KP |
407 | void |
408 | FcGlobalCacheReferenceSubdir (FcGlobalCache *cache, | |
409 | const FcChar8 *dir); | |
410 | ||
327a7fd4 KP |
411 | FcGlobalCacheDir * |
412 | FcGlobalCacheDirGet (FcGlobalCache *cache, | |
413 | const FcChar8 *dir, | |
414 | int len, | |
415 | FcBool create_missing); | |
24330d27 | 416 | |
179c3995 | 417 | FcBool |
327a7fd4 KP |
418 | FcGlobalCacheScanDir (FcFontSet *set, |
419 | FcStrSet *dirs, | |
420 | FcGlobalCache *cache, | |
d47c9d6e KP |
421 | const FcChar8 *dir, |
422 | FcConfig *config); | |
327a7fd4 KP |
423 | |
424 | FcGlobalCacheFile * | |
425 | FcGlobalCacheFileGet (FcGlobalCache *cache, | |
426 | const FcChar8 *file, | |
427 | int id, | |
428 | int *count); | |
429 | ||
179c3995 | 430 | |
24330d27 | 431 | void |
327a7fd4 KP |
432 | FcGlobalCacheLoad (FcGlobalCache *cache, |
433 | const FcChar8 *cache_file); | |
24330d27 KP |
434 | |
435 | FcBool | |
327a7fd4 KP |
436 | FcGlobalCacheUpdate (FcGlobalCache *cache, |
437 | const FcChar8 *file, | |
438 | int id, | |
439 | const FcChar8 *name); | |
24330d27 KP |
440 | |
441 | FcBool | |
327a7fd4 KP |
442 | FcGlobalCacheSave (FcGlobalCache *cache, |
443 | const FcChar8 *cache_file); | |
24330d27 | 444 | |
24330d27 | 445 | FcBool |
d47c9d6e KP |
446 | FcDirCacheReadDir (FcFontSet *set, |
447 | FcStrSet *dirs, | |
448 | const FcChar8 *dir, | |
449 | FcConfig *config); | |
327a7fd4 KP |
450 | |
451 | FcBool | |
452 | FcDirCacheWriteDir (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir); | |
24330d27 KP |
453 | |
454 | /* fccfg.c */ | |
455 | ||
179c3995 KP |
456 | FcBool |
457 | FcConfigAddConfigDir (FcConfig *config, | |
458 | const FcChar8 *d); | |
459 | ||
460 | FcBool | |
461 | FcConfigAddFontDir (FcConfig *config, | |
462 | const FcChar8 *d); | |
463 | ||
24330d27 | 464 | FcBool |
ccb3e93b KP |
465 | FcConfigAddDir (FcConfig *config, |
466 | const FcChar8 *d); | |
24330d27 KP |
467 | |
468 | FcBool | |
ccb3e93b KP |
469 | FcConfigAddConfigFile (FcConfig *config, |
470 | const FcChar8 *f); | |
24330d27 KP |
471 | |
472 | FcBool | |
473 | FcConfigSetCache (FcConfig *config, | |
ccb3e93b | 474 | const FcChar8 *c); |
24330d27 KP |
475 | |
476 | FcBool | |
477 | FcConfigAddBlank (FcConfig *config, | |
478 | FcChar32 blank); | |
479 | ||
480 | FcBool | |
481 | FcConfigAddEdit (FcConfig *config, | |
482 | FcTest *test, | |
483 | FcEdit *edit, | |
484 | FcMatchKind kind); | |
485 | ||
486 | void | |
487 | FcConfigSetFonts (FcConfig *config, | |
488 | FcFontSet *fonts, | |
489 | FcSetName set); | |
490 | ||
491 | FcBool | |
492 | FcConfigCompareValue (const FcValue m, | |
493 | FcOp op, | |
494 | const FcValue v); | |
495 | ||
d47c9d6e KP |
496 | FcBool |
497 | FcConfigGlobAdd (FcConfig *config, | |
498 | const FcChar8 *glob, | |
499 | FcBool accept); | |
500 | ||
501 | FcBool | |
502 | FcConfigAcceptFilename (FcConfig *config, | |
503 | const FcChar8 *filename); | |
504 | ||
4f27c1c0 KP |
505 | FcBool |
506 | FcConfigPatternsAdd (FcConfig *config, | |
507 | FcPattern *pattern, | |
508 | FcBool accept); | |
509 | ||
510 | FcBool | |
511 | FcConfigAcceptFont (FcConfig *config, | |
512 | const FcPattern *font); | |
513 | ||
24330d27 | 514 | /* fccharset.c */ |
4c003605 KP |
515 | FcCharSet * |
516 | FcCharSetFreeze (FcCharSet *cs); | |
517 | ||
34cd0514 CW |
518 | void |
519 | FcCharSetThawAll (void); | |
520 | ||
24330d27 | 521 | FcBool |
c2e7c611 | 522 | FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c); |
24330d27 KP |
523 | |
524 | FcCharSet * | |
525 | FcNameParseCharSet (FcChar8 *string); | |
526 | ||
c647f6f1 KP |
527 | FcCharLeaf * |
528 | FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4); | |
69937bd9 | 529 | |
24330d27 | 530 | /* fcdbg.c */ |
24330d27 | 531 | void |
938bc633 | 532 | FcValueListPrint (const FcValueList *l); |
24330d27 | 533 | |
793e946c KP |
534 | void |
535 | FcLangSetPrint (const FcLangSet *ls); | |
536 | ||
24330d27 KP |
537 | void |
538 | FcOpPrint (FcOp op); | |
539 | ||
540 | void | |
938bc633 | 541 | FcTestPrint (const FcTest *test); |
24330d27 KP |
542 | |
543 | void | |
938bc633 | 544 | FcExprPrint (const FcExpr *expr); |
24330d27 KP |
545 | |
546 | void | |
938bc633 | 547 | FcEditPrint (const FcEdit *edit); |
24330d27 KP |
548 | |
549 | void | |
938bc633 | 550 | FcSubstPrint (const FcSubst *subst); |
24330d27 | 551 | |
24330d27 KP |
552 | int |
553 | FcDebug (void); | |
554 | ||
555 | /* fcdir.c */ | |
24330d27 | 556 | |
2d9c79c0 KP |
557 | FcBool |
558 | FcFileIsDir (const FcChar8 *file); | |
559 | ||
d47c9d6e KP |
560 | FcBool |
561 | FcFileScanConfig (FcFontSet *set, | |
562 | FcStrSet *dirs, | |
563 | FcFileCache *cache, | |
564 | FcBlanks *blanks, | |
565 | const FcChar8 *file, | |
566 | FcBool force, | |
567 | FcConfig *config); | |
568 | ||
569 | FcBool | |
570 | FcDirScanConfig (FcFontSet *set, | |
571 | FcStrSet *dirs, | |
572 | FcFileCache *cache, | |
573 | FcBlanks *blanks, | |
574 | const FcChar8 *dir, | |
575 | FcBool force, | |
576 | FcConfig *config); | |
577 | ||
24330d27 KP |
578 | /* fcfont.c */ |
579 | int | |
580 | FcFontDebug (void); | |
581 | ||
82f4243f | 582 | /* fcfreetype.c */ |
e50b9ae7 KP |
583 | FcBool |
584 | FcFreeTypeIsExclusiveLang (const FcChar8 *lang); | |
585 | ||
82f4243f KP |
586 | FcBool |
587 | FcFreeTypeHasLang (FcPattern *pattern, const FcChar8 *lang); | |
588 | ||
c647f6f1 KP |
589 | FcChar32 |
590 | FcFreeTypeUcs4ToPrivate (FcChar32 ucs4, const FcCharMap *map); | |
591 | ||
592 | FcChar32 | |
593 | FcFreeTypePrivateToUcs4 (FcChar32 private, const FcCharMap *map); | |
594 | ||
595 | const FcCharMap * | |
596 | FcFreeTypeGetPrivateMap (FT_Encoding encoding); | |
597 | ||
24330d27 KP |
598 | /* fcfs.c */ |
599 | /* fcgram.y */ | |
600 | int | |
601 | FcConfigparse (void); | |
602 | ||
603 | int | |
604 | FcConfigwrap (void); | |
605 | ||
606 | void | |
607 | FcConfigerror (char *fmt, ...); | |
608 | ||
609 | char * | |
610 | FcConfigSaveField (const char *field); | |
611 | ||
24330d27 KP |
612 | void |
613 | FcTestDestroy (FcTest *test); | |
614 | ||
615 | FcExpr * | |
616 | FcExprCreateInteger (int i); | |
617 | ||
618 | FcExpr * | |
619 | FcExprCreateDouble (double d); | |
620 | ||
621 | FcExpr * | |
ccb3e93b | 622 | FcExprCreateString (const FcChar8 *s); |
24330d27 KP |
623 | |
624 | FcExpr * | |
625 | FcExprCreateMatrix (const FcMatrix *m); | |
626 | ||
627 | FcExpr * | |
628 | FcExprCreateBool (FcBool b); | |
629 | ||
630 | FcExpr * | |
631 | FcExprCreateNil (void); | |
632 | ||
633 | FcExpr * | |
634 | FcExprCreateField (const char *field); | |
635 | ||
636 | FcExpr * | |
ccb3e93b | 637 | FcExprCreateConst (const FcChar8 *constant); |
24330d27 KP |
638 | |
639 | FcExpr * | |
640 | FcExprCreateOp (FcExpr *left, FcOp op, FcExpr *right); | |
641 | ||
642 | void | |
643 | FcExprDestroy (FcExpr *e); | |
644 | ||
24330d27 KP |
645 | void |
646 | FcEditDestroy (FcEdit *e); | |
647 | ||
648 | /* fcinit.c */ | |
649 | ||
650 | void | |
651 | FcMemReport (void); | |
652 | ||
653 | void | |
654 | FcMemAlloc (int kind, int size); | |
655 | ||
656 | void | |
657 | FcMemFree (int kind, int size); | |
658 | ||
82f4243f | 659 | /* fclang.c */ |
d8d73958 KP |
660 | FcLangSet * |
661 | FcFreeTypeLangSet (const FcCharSet *charset, | |
e50b9ae7 | 662 | const FcChar8 *exclusiveLang); |
82f4243f KP |
663 | |
664 | FcLangResult | |
665 | FcLangCompare (const FcChar8 *s1, const FcChar8 *s2); | |
666 | ||
667 | const FcCharSet * | |
668 | FcCharSetForLang (const FcChar8 *lang); | |
669 | ||
d8d73958 KP |
670 | FcLangSet * |
671 | FcLangSetPromote (const FcChar8 *lang); | |
672 | ||
673 | FcLangSet * | |
674 | FcNameParseLangSet (const FcChar8 *string); | |
675 | ||
676 | FcBool | |
677 | FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls); | |
678 | ||
24330d27 KP |
679 | /* fclist.c */ |
680 | ||
4f27c1c0 KP |
681 | FcBool |
682 | FcListPatternMatchAny (const FcPattern *p, | |
683 | const FcPattern *font); | |
684 | ||
24330d27 KP |
685 | /* fcmatch.c */ |
686 | ||
687 | /* fcname.c */ | |
24330d27 KP |
688 | |
689 | FcBool | |
ca60d2b5 | 690 | FcNameBool (const FcChar8 *v, FcBool *result); |
24330d27 | 691 | |
24330d27 KP |
692 | /* fcpat.c */ |
693 | void | |
694 | FcValueListDestroy (FcValueList *l); | |
695 | ||
696 | FcPatternElt * | |
e9be9cd1 KP |
697 | FcPatternFindElt (const FcPattern *p, const char *object); |
698 | ||
699 | FcPatternElt * | |
700 | FcPatternInsertElt (FcPattern *p, const char *object); | |
24330d27 | 701 | |
82f4243f KP |
702 | FcBool |
703 | FcPatternAddWithBinding (FcPattern *p, | |
704 | const char *object, | |
705 | FcValue value, | |
706 | FcValueBinding binding, | |
707 | FcBool append); | |
708 | ||
d8d73958 KP |
709 | FcPattern * |
710 | FcPatternFreeze (FcPattern *p); | |
711 | ||
34cd0514 CW |
712 | void |
713 | FcPatternThawAll (void); | |
714 | ||
4f27c1c0 KP |
715 | FcBool |
716 | FcPatternAppend (FcPattern *p, FcPattern *s); | |
717 | ||
718 | const char * | |
719 | FcObjectStaticName (const char *name); | |
720 | ||
24330d27 KP |
721 | /* fcrender.c */ |
722 | ||
723 | /* fcmatrix.c */ | |
327a7fd4 KP |
724 | |
725 | extern const FcMatrix FcIdentityMatrix; | |
726 | ||
24330d27 KP |
727 | void |
728 | FcMatrixFree (FcMatrix *mat); | |
729 | ||
730 | /* fcstr.c */ | |
ccb3e93b KP |
731 | FcChar8 * |
732 | FcStrPlus (const FcChar8 *s1, const FcChar8 *s2); | |
24330d27 KP |
733 | |
734 | void | |
ccb3e93b | 735 | FcStrFree (FcChar8 *s); |
24330d27 | 736 | |
c2e7c611 KP |
737 | void |
738 | FcStrBufInit (FcStrBuf *buf, FcChar8 *init, int size); | |
739 | ||
740 | void | |
741 | FcStrBufDestroy (FcStrBuf *buf); | |
742 | ||
743 | FcChar8 * | |
744 | FcStrBufDone (FcStrBuf *buf); | |
745 | ||
746 | FcBool | |
747 | FcStrBufChar (FcStrBuf *buf, FcChar8 c); | |
748 | ||
749 | FcBool | |
750 | FcStrBufString (FcStrBuf *buf, const FcChar8 *s); | |
751 | ||
752 | FcBool | |
753 | FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len); | |
754 | ||
82f4243f KP |
755 | int |
756 | FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2); | |
757 | ||
11fec41c KP |
758 | const FcChar8 * |
759 | FcStrContainsIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2); | |
760 | ||
761 | const FcChar8 * | |
762 | FcStrContainsIgnoreCase (const FcChar8 *s1, const FcChar8 *s2); | |
763 | ||
ff3f1f98 KP |
764 | FcBool |
765 | FcStrUsesHome (const FcChar8 *s); | |
766 | ||
daeed6e0 TL |
767 | FcChar8 * |
768 | FcStrLastSlash (const FcChar8 *path); | |
769 | ||
192296d8 KP |
770 | FcChar32 |
771 | FcStrHashIgnoreCase (const FcChar8 *s); | |
772 | ||
24330d27 | 773 | #endif /* _FC_INT_H_ */ |