]>
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 | |
212c9f43 PL |
262 | typedef struct _FcCache { |
263 | int magic; | |
264 | off_t fontsets_offset; | |
265 | off_t pattern_offset; int pattern_length; | |
266 | off_t patternelt_offset; int patternelt_length; | |
267 | off_t valuelist_offset; int valuelist_length; | |
268 | off_t object_offset; int object_length; | |
269 | off_t objectcontent_offset; int objectcontent_length; | |
270 | off_t langsets_offset; int langsets_length; | |
271 | off_t charsets_offset; int charsets_length; | |
272 | off_t charset_leaf_offset; int charset_num_sum; | |
273 | off_t charset_leafidx_offset; | |
274 | off_t charset_numbers_offset; | |
275 | off_t matrices_offset; int matrices_length; | |
276 | off_t strsets_offset; int strsets_length; | |
277 | off_t strsets_idx_offset; int strsets_idx_length; | |
278 | off_t strset_buf_offset; int strset_buf_length; | |
279 | } FcCache; | |
280 | ||
7769c321 KP |
281 | /* |
282 | * To map adobe glyph names to unicode values, a precomputed hash | |
283 | * table is used | |
284 | */ | |
285 | ||
286 | typedef struct _FcGlyphName { | |
287 | FcChar32 ucs; /* unicode value */ | |
288 | FcChar8 name[1]; /* name extends beyond struct */ | |
289 | } FcGlyphName; | |
290 | ||
192296d8 KP |
291 | /* |
292 | * To perform case-insensitive string comparisons, a table | |
293 | * is used which holds three different kinds of folding data. | |
294 | * | |
295 | * The first is a range of upper case values mapping to a range | |
296 | * of their lower case equivalents. Within each range, the offset | |
297 | * between upper and lower case is constant. | |
298 | * | |
299 | * The second is a range of upper case values which are interleaved | |
300 | * with their lower case equivalents. | |
301 | * | |
302 | * The third is a set of raw unicode values mapping to a list | |
303 | * of unicode values for comparison purposes. This allows conversion | |
304 | * of ß to "ss" so that SS, ss and ß all match. A separate array | |
305 | * holds the list of unicode values for each entry. | |
306 | * | |
307 | * These are packed into a single table. Using a binary search, | |
308 | * the appropriate entry can be located. | |
309 | */ | |
310 | ||
311 | #define FC_CASE_FOLD_RANGE 0 | |
312 | #define FC_CASE_FOLD_EVEN_ODD 1 | |
313 | #define FC_CASE_FOLD_FULL 2 | |
314 | ||
315 | typedef struct _FcCaseFold { | |
316 | FcChar32 upper; | |
317 | FcChar16 method : 2; | |
318 | FcChar16 count : 14; | |
319 | short offset; /* lower - upper for RANGE, table id for FULL */ | |
320 | } FcCaseFold; | |
321 | ||
2d9c79c0 KP |
322 | #define FC_MAX_FILE_LEN 4096 |
323 | ||
327a7fd4 | 324 | /* |
f21f40f3 | 325 | * The per-user ~/.fonts.cache-<version> file is loaded into |
327a7fd4 KP |
326 | * this data structure. Each directory gets a substructure |
327 | * which is validated by comparing the directory timestamp with | |
328 | * that saved in the cache. When valid, the entire directory cache | |
329 | * can be immediately loaded without reading the directory. Otherwise, | |
330 | * the files are checked individually; updated files are loaded into the | |
331 | * cache which is then rewritten to the users home directory | |
332 | */ | |
333 | ||
212c9f43 | 334 | #define FC_CACHE_MAGIC 0x12345678 |
327a7fd4 KP |
335 | #define FC_GLOBAL_CACHE_DIR_HASH_SIZE 37 |
336 | #define FC_GLOBAL_CACHE_FILE_HASH_SIZE 67 | |
337 | ||
338 | typedef struct _FcGlobalCacheInfo { | |
339 | unsigned int hash; | |
340 | FcChar8 *file; | |
341 | time_t time; | |
342 | FcBool referenced; | |
343 | } FcGlobalCacheInfo; | |
344 | ||
345 | typedef struct _FcGlobalCacheFile { | |
346 | struct _FcGlobalCacheFile *next; | |
347 | FcGlobalCacheInfo info; | |
348 | int id; | |
349 | FcChar8 *name; | |
350 | } FcGlobalCacheFile; | |
351 | ||
e712133c KP |
352 | typedef struct _FcGlobalCacheDir FcGlobalCacheDir; |
353 | ||
327a7fd4 KP |
354 | typedef struct _FcGlobalCacheSubdir { |
355 | struct _FcGlobalCacheSubdir *next; | |
e712133c | 356 | FcGlobalCacheDir *ent; |
327a7fd4 KP |
357 | } FcGlobalCacheSubdir; |
358 | ||
e712133c | 359 | struct _FcGlobalCacheDir { |
327a7fd4 KP |
360 | struct _FcGlobalCacheDir *next; |
361 | FcGlobalCacheInfo info; | |
362 | int len; | |
363 | FcGlobalCacheFile *ents[FC_GLOBAL_CACHE_FILE_HASH_SIZE]; | |
364 | FcGlobalCacheSubdir *subdirs; | |
e712133c | 365 | }; |
327a7fd4 KP |
366 | |
367 | typedef struct _FcGlobalCache { | |
368 | FcGlobalCacheDir *ents[FC_GLOBAL_CACHE_DIR_HASH_SIZE]; | |
369 | FcBool updated; | |
370 | FcBool broken; | |
371 | int entries; | |
372 | int referenced; | |
373 | } FcGlobalCache; | |
24330d27 | 374 | |
134f6011 KP |
375 | struct _FcAtomic { |
376 | FcChar8 *file; /* original file name */ | |
377 | FcChar8 *new; /* temp file name -- write data here */ | |
378 | FcChar8 *lck; /* lockfile name (used for locking) */ | |
379 | FcChar8 *tmp; /* tmpfile name (used for locking) */ | |
380 | }; | |
381 | ||
24330d27 KP |
382 | struct _FcBlanks { |
383 | int nblank; | |
384 | int sblank; | |
385 | FcChar32 *blanks; | |
386 | }; | |
387 | ||
388 | struct _FcConfig { | |
389 | /* | |
390 | * File names loaded from the configuration -- saved here as the | |
391 | * cache file must be consulted before the directories are scanned, | |
392 | * and those directives may occur in any order | |
393 | */ | |
179c3995 | 394 | FcStrSet *configDirs; /* directories to scan for fonts */ |
ccb3e93b | 395 | FcChar8 *cache; /* name of per-user cache file */ |
24330d27 KP |
396 | /* |
397 | * Set of allowed blank chars -- used to | |
398 | * trim fonts of bogus glyphs | |
399 | */ | |
400 | FcBlanks *blanks; | |
179c3995 KP |
401 | /* |
402 | * List of directories containing fonts, | |
403 | * built by recursively scanning the set | |
404 | * of configured directories | |
405 | */ | |
406 | FcStrSet *fontDirs; | |
24330d27 KP |
407 | /* |
408 | * Names of all of the configuration files used | |
409 | * to create this configuration | |
410 | */ | |
179c3995 | 411 | FcStrSet *configFiles; /* config files loaded */ |
24330d27 KP |
412 | /* |
413 | * Substitution instructions for patterns and fonts; | |
414 | * maxObjects is used to allocate appropriate intermediate storage | |
415 | * while performing a whole set of substitutions | |
416 | */ | |
417 | FcSubst *substPattern; /* substitutions for patterns */ | |
418 | FcSubst *substFont; /* substitutions for fonts */ | |
419 | int maxObjects; /* maximum number of tests in all substs */ | |
d47c9d6e KP |
420 | /* |
421 | * List of patterns used to control font file selection | |
422 | */ | |
423 | FcStrSet *acceptGlobs; | |
424 | FcStrSet *rejectGlobs; | |
4f27c1c0 KP |
425 | FcFontSet *acceptPatterns; |
426 | FcFontSet *rejectPatterns; | |
24330d27 KP |
427 | /* |
428 | * The set of fonts loaded from the listed directories; the | |
429 | * order within the set does not determine the font selection, | |
430 | * except in the case of identical matches in which case earlier fonts | |
431 | * match preferrentially | |
432 | */ | |
433 | FcFontSet *fonts[FcSetApplication + 1]; | |
179c3995 KP |
434 | /* |
435 | * Fontconfig can periodically rescan the system configuration | |
436 | * and font directories. This rescanning occurs when font | |
437 | * listing requests are made, but no more often than rescanInterval | |
438 | * seconds apart. | |
439 | */ | |
440 | time_t rescanTime; /* last time information was scanned */ | |
441 | int rescanInterval; /* interval between scans */ | |
24330d27 KP |
442 | }; |
443 | ||
6e9fc5de KP |
444 | extern FcConfig *_fcConfig; |
445 | ||
69937bd9 KP |
446 | typedef struct _FcCharMap FcCharMap; |
447 | ||
24330d27 KP |
448 | /* fcblanks.c */ |
449 | ||
450 | /* fccache.c */ | |
451 | ||
212c9f43 PL |
452 | int |
453 | FcCacheNextOffset(int fd); | |
24330d27 KP |
454 | |
455 | void | |
212c9f43 | 456 | FcCacheForce(FcBool force); |
327a7fd4 | 457 | |
c4ab52dc | 458 | void |
212c9f43 | 459 | FcCacheClearStatic(void); |
24330d27 KP |
460 | |
461 | FcBool | |
212c9f43 | 462 | FcCachePrepareSerialize(FcConfig * config); |
24330d27 KP |
463 | |
464 | FcBool | |
212c9f43 | 465 | FcCacheSerialize (FcConfig * config); |
24330d27 | 466 | |
24330d27 | 467 | FcBool |
212c9f43 | 468 | FcCacheRead (FcConfig *config); |
327a7fd4 KP |
469 | |
470 | FcBool | |
212c9f43 PL |
471 | FcCacheWrite (FcConfig * config); |
472 | ||
24330d27 KP |
473 | /* fccfg.c */ |
474 | ||
179c3995 KP |
475 | FcBool |
476 | FcConfigAddConfigDir (FcConfig *config, | |
477 | const FcChar8 *d); | |
478 | ||
479 | FcBool | |
480 | FcConfigAddFontDir (FcConfig *config, | |
481 | const FcChar8 *d); | |
482 | ||
24330d27 | 483 | FcBool |
ccb3e93b KP |
484 | FcConfigAddDir (FcConfig *config, |
485 | const FcChar8 *d); | |
24330d27 KP |
486 | |
487 | FcBool | |
ccb3e93b KP |
488 | FcConfigAddConfigFile (FcConfig *config, |
489 | const FcChar8 *f); | |
24330d27 KP |
490 | |
491 | FcBool | |
492 | FcConfigSetCache (FcConfig *config, | |
ccb3e93b | 493 | const FcChar8 *c); |
24330d27 KP |
494 | |
495 | FcBool | |
496 | FcConfigAddBlank (FcConfig *config, | |
497 | FcChar32 blank); | |
498 | ||
499 | FcBool | |
500 | FcConfigAddEdit (FcConfig *config, | |
501 | FcTest *test, | |
502 | FcEdit *edit, | |
503 | FcMatchKind kind); | |
504 | ||
505 | void | |
506 | FcConfigSetFonts (FcConfig *config, | |
507 | FcFontSet *fonts, | |
508 | FcSetName set); | |
509 | ||
510 | FcBool | |
511 | FcConfigCompareValue (const FcValue m, | |
512 | FcOp op, | |
513 | const FcValue v); | |
514 | ||
d47c9d6e KP |
515 | FcBool |
516 | FcConfigGlobAdd (FcConfig *config, | |
517 | const FcChar8 *glob, | |
518 | FcBool accept); | |
519 | ||
520 | FcBool | |
521 | FcConfigAcceptFilename (FcConfig *config, | |
522 | const FcChar8 *filename); | |
523 | ||
4f27c1c0 KP |
524 | FcBool |
525 | FcConfigPatternsAdd (FcConfig *config, | |
526 | FcPattern *pattern, | |
527 | FcBool accept); | |
528 | ||
529 | FcBool | |
530 | FcConfigAcceptFont (FcConfig *config, | |
531 | const FcPattern *font); | |
532 | ||
24330d27 | 533 | /* fccharset.c */ |
4c003605 KP |
534 | FcCharSet * |
535 | FcCharSetFreeze (FcCharSet *cs); | |
536 | ||
212c9f43 PL |
537 | FcCharSetPtr |
538 | FcCharSetCopyPtr (FcCharSetPtr src); | |
539 | ||
34cd0514 CW |
540 | void |
541 | FcCharSetThawAll (void); | |
542 | ||
24330d27 | 543 | FcBool |
c2e7c611 | 544 | FcNameUnparseCharSet (FcStrBuf *buf, const FcCharSet *c); |
24330d27 KP |
545 | |
546 | FcCharSet * | |
547 | FcNameParseCharSet (FcChar8 *string); | |
548 | ||
c647f6f1 KP |
549 | FcCharLeaf * |
550 | FcCharSetFindLeafCreate (FcCharSet *fcs, FcChar32 ucs4); | |
69937bd9 | 551 | |
cd2ec1a9 PL |
552 | void |
553 | FcCharSetPtrDestroy (FcCharSetPtr fcs); | |
554 | ||
555 | void | |
556 | FcCharSetClearStatic(void); | |
557 | ||
558 | FcBool | |
559 | FcCharSetPrepareSerialize(FcCharSet *c); | |
560 | ||
561 | FcCharSetPtr | |
562 | FcCharSetSerialize(FcCharSet *c); | |
563 | ||
564 | FcCharSetPtr | |
565 | FcCharSetPtrCreateDynamic(FcCharSet *c); | |
566 | ||
567 | FcCharLeaf * | |
568 | FcCharSetGetLeaf(const FcCharSet *c, int i); | |
569 | ||
570 | FcChar16 * | |
571 | FcCharSetGetNumbers(const FcCharSet *c); | |
572 | ||
212c9f43 PL |
573 | FcBool |
574 | FcCharSetRead (int fd, FcCache metadata); | |
575 | ||
576 | FcBool | |
577 | FcCharSetWrite (int fd, FcCache *metadata); | |
578 | ||
24330d27 | 579 | /* fcdbg.c */ |
24330d27 | 580 | void |
cd2ec1a9 | 581 | FcValueListPrint (const FcValueListPtr l); |
24330d27 | 582 | |
793e946c KP |
583 | void |
584 | FcLangSetPrint (const FcLangSet *ls); | |
585 | ||
24330d27 KP |
586 | void |
587 | FcOpPrint (FcOp op); | |
588 | ||
589 | void | |
938bc633 | 590 | FcTestPrint (const FcTest *test); |
24330d27 KP |
591 | |
592 | void | |
938bc633 | 593 | FcExprPrint (const FcExpr *expr); |
24330d27 KP |
594 | |
595 | void | |
938bc633 | 596 | FcEditPrint (const FcEdit *edit); |
24330d27 KP |
597 | |
598 | void | |
938bc633 | 599 | FcSubstPrint (const FcSubst *subst); |
24330d27 | 600 | |
24330d27 KP |
601 | int |
602 | FcDebug (void); | |
603 | ||
cd2ec1a9 PL |
604 | FcCharSet * |
605 | FcCharSetPtrU (FcCharSetPtr mi); | |
606 | ||
24330d27 | 607 | /* fcdir.c */ |
24330d27 | 608 | |
2d9c79c0 KP |
609 | FcBool |
610 | FcFileIsDir (const FcChar8 *file); | |
611 | ||
d47c9d6e KP |
612 | FcBool |
613 | FcFileScanConfig (FcFontSet *set, | |
614 | FcStrSet *dirs, | |
615 | FcFileCache *cache, | |
616 | FcBlanks *blanks, | |
617 | const FcChar8 *file, | |
618 | FcBool force, | |
619 | FcConfig *config); | |
620 | ||
621 | FcBool | |
622 | FcDirScanConfig (FcFontSet *set, | |
623 | FcStrSet *dirs, | |
624 | FcFileCache *cache, | |
625 | FcBlanks *blanks, | |
626 | const FcChar8 *dir, | |
627 | FcBool force, | |
628 | FcConfig *config); | |
629 | ||
24330d27 KP |
630 | /* fcfont.c */ |
631 | int | |
632 | FcFontDebug (void); | |
633 | ||
82f4243f | 634 | /* fcfreetype.c */ |
e50b9ae7 KP |
635 | FcBool |
636 | FcFreeTypeIsExclusiveLang (const FcChar8 *lang); | |
637 | ||
82f4243f KP |
638 | FcBool |
639 | FcFreeTypeHasLang (FcPattern *pattern, const FcChar8 *lang); | |
640 | ||
c647f6f1 KP |
641 | FcChar32 |
642 | FcFreeTypeUcs4ToPrivate (FcChar32 ucs4, const FcCharMap *map); | |
643 | ||
644 | FcChar32 | |
645 | FcFreeTypePrivateToUcs4 (FcChar32 private, const FcCharMap *map); | |
646 | ||
647 | const FcCharMap * | |
648 | FcFreeTypeGetPrivateMap (FT_Encoding encoding); | |
649 | ||
24330d27 | 650 | /* fcfs.c */ |
cd2ec1a9 PL |
651 | |
652 | void | |
653 | FcFontSetClearStatic (void); | |
654 | ||
655 | FcBool | |
656 | FcFontSetPrepareSerialize (FcFontSet * s); | |
657 | ||
658 | FcBool | |
659 | FcFontSetSerialize (FcFontSet * s); | |
660 | ||
212c9f43 PL |
661 | FcBool |
662 | FcFontSetRead(int fd, FcConfig * config, FcCache metadata); | |
663 | ||
664 | FcBool | |
665 | FcFontSetWrite(int fd, FcConfig * config, FcCache * metadata); | |
666 | ||
24330d27 KP |
667 | /* fcgram.y */ |
668 | int | |
669 | FcConfigparse (void); | |
670 | ||
671 | int | |
672 | FcConfigwrap (void); | |
673 | ||
674 | void | |
675 | FcConfigerror (char *fmt, ...); | |
676 | ||
677 | char * | |
678 | FcConfigSaveField (const char *field); | |
679 | ||
24330d27 KP |
680 | void |
681 | FcTestDestroy (FcTest *test); | |
682 | ||
683 | FcExpr * | |
684 | FcExprCreateInteger (int i); | |
685 | ||
686 | FcExpr * | |
687 | FcExprCreateDouble (double d); | |
688 | ||
689 | FcExpr * | |
ccb3e93b | 690 | FcExprCreateString (const FcChar8 *s); |
24330d27 KP |
691 | |
692 | FcExpr * | |
693 | FcExprCreateMatrix (const FcMatrix *m); | |
694 | ||
695 | FcExpr * | |
696 | FcExprCreateBool (FcBool b); | |
697 | ||
698 | FcExpr * | |
699 | FcExprCreateNil (void); | |
700 | ||
701 | FcExpr * | |
702 | FcExprCreateField (const char *field); | |
703 | ||
704 | FcExpr * | |
ccb3e93b | 705 | FcExprCreateConst (const FcChar8 *constant); |
24330d27 KP |
706 | |
707 | FcExpr * | |
708 | FcExprCreateOp (FcExpr *left, FcOp op, FcExpr *right); | |
709 | ||
710 | void | |
711 | FcExprDestroy (FcExpr *e); | |
712 | ||
24330d27 KP |
713 | void |
714 | FcEditDestroy (FcEdit *e); | |
715 | ||
716 | /* fcinit.c */ | |
717 | ||
718 | void | |
719 | FcMemReport (void); | |
720 | ||
721 | void | |
722 | FcMemAlloc (int kind, int size); | |
723 | ||
724 | void | |
725 | FcMemFree (int kind, int size); | |
726 | ||
82f4243f | 727 | /* fclang.c */ |
d8d73958 KP |
728 | FcLangSet * |
729 | FcFreeTypeLangSet (const FcCharSet *charset, | |
e50b9ae7 | 730 | const FcChar8 *exclusiveLang); |
82f4243f KP |
731 | |
732 | FcLangResult | |
733 | FcLangCompare (const FcChar8 *s1, const FcChar8 *s2); | |
734 | ||
735 | const FcCharSet * | |
736 | FcCharSetForLang (const FcChar8 *lang); | |
737 | ||
d8d73958 KP |
738 | FcLangSet * |
739 | FcLangSetPromote (const FcChar8 *lang); | |
740 | ||
741 | FcLangSet * | |
742 | FcNameParseLangSet (const FcChar8 *string); | |
743 | ||
744 | FcBool | |
745 | FcNameUnparseLangSet (FcStrBuf *buf, const FcLangSet *ls); | |
746 | ||
cd2ec1a9 PL |
747 | void |
748 | FcLangSetClearStatic (void); | |
749 | ||
750 | FcBool | |
751 | FcLangSetPrepareSerialize (FcLangSet *l); | |
752 | ||
753 | FcLangSetPtr | |
754 | FcLangSetSerialize (FcLangSet *l); | |
755 | ||
756 | FcLangSet * | |
757 | FcLangSetPtrU (FcLangSetPtr li); | |
758 | ||
759 | FcLangSetPtr | |
760 | FcLangSetPtrCreateDynamic (FcLangSet *l); | |
761 | ||
762 | void | |
763 | FcLangSetPtrDestroy (FcLangSetPtr li); | |
764 | ||
212c9f43 PL |
765 | FcBool |
766 | FcLangSetRead (int fd, FcCache metadata); | |
767 | ||
768 | FcBool | |
769 | FcLangSetWrite (int fd, FcCache *metadata); | |
770 | ||
24330d27 KP |
771 | /* fclist.c */ |
772 | ||
4f27c1c0 KP |
773 | FcBool |
774 | FcListPatternMatchAny (const FcPattern *p, | |
775 | const FcPattern *font); | |
776 | ||
24330d27 KP |
777 | /* fcmatch.c */ |
778 | ||
779 | /* fcname.c */ | |
24330d27 KP |
780 | |
781 | FcBool | |
ca60d2b5 | 782 | FcNameBool (const FcChar8 *v, FcBool *result); |
24330d27 | 783 | |
24330d27 KP |
784 | /* fcpat.c */ |
785 | void | |
cd2ec1a9 PL |
786 | FcValueListDestroy (FcValueListPtr l); |
787 | ||
24330d27 | 788 | FcPatternElt * |
e9be9cd1 KP |
789 | FcPatternFindElt (const FcPattern *p, const char *object); |
790 | ||
791 | FcPatternElt * | |
792 | FcPatternInsertElt (FcPattern *p, const char *object); | |
24330d27 | 793 | |
82f4243f KP |
794 | FcBool |
795 | FcPatternAddWithBinding (FcPattern *p, | |
796 | const char *object, | |
797 | FcValue value, | |
798 | FcValueBinding binding, | |
799 | FcBool append); | |
800 | ||
d8d73958 KP |
801 | FcPattern * |
802 | FcPatternFreeze (FcPattern *p); | |
803 | ||
34cd0514 | 804 | void |
e1b9d091 | 805 | FcPatternFini (void); |
34cd0514 | 806 | |
4f27c1c0 KP |
807 | FcBool |
808 | FcPatternAppend (FcPattern *p, FcPattern *s); | |
809 | ||
cd2ec1a9 PL |
810 | void |
811 | FcObjectClearStatic(void); | |
812 | ||
813 | FcObjectPtr | |
4f27c1c0 KP |
814 | FcObjectStaticName (const char *name); |
815 | ||
cd2ec1a9 | 816 | FcBool |
212c9f43 PL |
817 | FcObjectRead (int fd, FcCache metadata); |
818 | ||
819 | FcBool | |
820 | FcObjectWrite (int fd, FcCache * metadata); | |
cd2ec1a9 PL |
821 | |
822 | const char * | |
823 | FcObjectPtrU (FcObjectPtr p); | |
824 | ||
825 | int | |
826 | FcObjectPtrCompare (FcObjectPtr a, FcObjectPtr b); | |
827 | ||
cd2ec1a9 PL |
828 | void |
829 | FcObjectPtrDestroy (FcObjectPtr p); | |
830 | ||
831 | FcBool | |
832 | FcPatternPrepareSerialize (FcPattern *p); | |
833 | ||
834 | void | |
835 | FcValueListClearStatic (void); | |
836 | ||
837 | void | |
838 | FcPatternClearStatic (void); | |
839 | ||
840 | FcValueList * | |
841 | FcValueListPtrU(FcValueListPtr p); | |
842 | ||
843 | FcPatternElt * | |
844 | FcPatternEltU (FcPatternEltPtr pei); | |
845 | ||
846 | FcValueListPtr | |
847 | FcValueListPtrCreateDynamic(FcValueList * p); | |
848 | ||
849 | FcBool | |
850 | FcValueListPrepareSerialize (FcValueList *p); | |
851 | ||
852 | FcValueListPtr | |
853 | FcValueListSerialize(FcValueList *pi); | |
854 | ||
855 | FcPattern * | |
856 | FcPatternSerialize (FcPattern * p); | |
857 | ||
212c9f43 PL |
858 | FcBool |
859 | FcPatternRead (int fd, FcCache metadata); | |
860 | ||
861 | FcBool | |
862 | FcPatternWrite (int fd, FcCache *metadata); | |
863 | ||
864 | FcBool | |
865 | FcPatternEltRead (int fd, FcCache metadata); | |
866 | ||
867 | FcBool | |
868 | FcPatternEltWrite (int fd, FcCache *metadata); | |
869 | ||
870 | FcBool | |
871 | FcValueListRead (int fd, FcCache metadata); | |
872 | ||
873 | FcBool | |
874 | FcValueListWrite (int fd, FcCache *metadata); | |
875 | ||
24330d27 KP |
876 | /* fcrender.c */ |
877 | ||
878 | /* fcmatrix.c */ | |
327a7fd4 | 879 | |
cd2ec1a9 | 880 | extern const FcMatrixPtr FcIdentityMatrix; |
327a7fd4 | 881 | |
24330d27 KP |
882 | void |
883 | FcMatrixFree (FcMatrix *mat); | |
884 | ||
cd2ec1a9 PL |
885 | void |
886 | FcMatrixPtrDestroy (FcMatrixPtr mi); | |
887 | ||
888 | FcBool | |
889 | FcMatrixPrepareSerialize(FcMatrix *m); | |
890 | ||
891 | FcMatrixPtr | |
892 | FcMatrixSerialize(FcMatrix *m); | |
893 | ||
894 | FcMatrix * | |
895 | FcMatrixPtrU (FcMatrixPtr mi); | |
896 | ||
897 | FcMatrixPtr | |
898 | FcMatrixPtrCreateDynamic (FcMatrix *m); | |
899 | ||
900 | void | |
901 | FcMatrixClearStatic (void); | |
902 | ||
212c9f43 PL |
903 | FcBool |
904 | FcMatrixWrite (int fd, FcCache *metadata); | |
905 | ||
906 | FcBool | |
907 | FcMatrixRead (int fd, FcCache metadata); | |
908 | ||
24330d27 | 909 | /* fcstr.c */ |
cd2ec1a9 PL |
910 | FcStrSet * |
911 | FcStrSetPtrU (const FcStrSetPtr set); | |
912 | ||
913 | FcStrSetPtr | |
914 | FcStrSetPtrCreateDynamic (const FcStrSet * set); | |
915 | ||
916 | void | |
917 | FcStrSetClearStatic (void); | |
918 | ||
919 | FcBool | |
920 | FcStrSetPrepareSerialize (const FcStrSet *set); | |
921 | ||
922 | void | |
923 | FcStrSetSort (FcStrSet * set); | |
924 | ||
925 | FcChar8 * | |
926 | FcStrSetGet (const FcStrSet *set, int i); | |
927 | ||
ccb3e93b KP |
928 | FcChar8 * |
929 | FcStrPlus (const FcChar8 *s1, const FcChar8 *s2); | |
24330d27 KP |
930 | |
931 | void | |
ccb3e93b | 932 | FcStrFree (FcChar8 *s); |
24330d27 | 933 | |
c2e7c611 KP |
934 | void |
935 | FcStrBufInit (FcStrBuf *buf, FcChar8 *init, int size); | |
936 | ||
937 | void | |
938 | FcStrBufDestroy (FcStrBuf *buf); | |
939 | ||
940 | FcChar8 * | |
941 | FcStrBufDone (FcStrBuf *buf); | |
942 | ||
943 | FcBool | |
944 | FcStrBufChar (FcStrBuf *buf, FcChar8 c); | |
945 | ||
946 | FcBool | |
947 | FcStrBufString (FcStrBuf *buf, const FcChar8 *s); | |
948 | ||
949 | FcBool | |
950 | FcStrBufData (FcStrBuf *buf, const FcChar8 *s, int len); | |
951 | ||
cd2ec1a9 PL |
952 | FcStrSetPtr |
953 | FcStrSetSerialize (FcStrSet *set); | |
954 | ||
212c9f43 PL |
955 | FcBool |
956 | FcStrSetRead (int fd, FcCache metadata); | |
957 | ||
958 | FcBool | |
959 | FcStrSetWrite (int fd, FcCache *metadata); | |
960 | ||
82f4243f KP |
961 | int |
962 | FcStrCmpIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2); | |
963 | ||
11fec41c KP |
964 | const FcChar8 * |
965 | FcStrContainsIgnoreBlanksAndCase (const FcChar8 *s1, const FcChar8 *s2); | |
966 | ||
967 | const FcChar8 * | |
968 | FcStrContainsIgnoreCase (const FcChar8 *s1, const FcChar8 *s2); | |
969 | ||
ff3f1f98 KP |
970 | FcBool |
971 | FcStrUsesHome (const FcChar8 *s); | |
972 | ||
daeed6e0 TL |
973 | FcChar8 * |
974 | FcStrLastSlash (const FcChar8 *path); | |
975 | ||
192296d8 KP |
976 | FcChar32 |
977 | FcStrHashIgnoreCase (const FcChar8 *s); | |
978 | ||
24330d27 | 979 | #endif /* _FC_INT_H_ */ |